RooCategory& RooCategory::operator=(const RooCategory&) function deleted in ROOT 6.22

I am currently using ROOT 6.20 which has the RooCategory& RooCategory::operator=(const RooCategory&) function but need to to move to ROOT 6.22. As the function has been deleted in this ROOT version is there any way to do the same command in the new format?


@Seophine I checked assignment operator operator= for RooCategory and it is still available in current master docs as well as in 6.22: or

@Axel can you please confirm, I am bit confused?

Ah I see, in the code it is defined as a “deleted”…Then I think you need to use or move constructor or move assignment operator, which I don’t see…

Code snippet and error for anyone interested.

Code Snippet:

 _category_var = *(categories->get_category_var());

Error when building code:

/home/.../B2DhPartRecoGGSZDataLoader.cpp:25:53: error: use of deleted function 'RooCategory& RooCategory::operator=(const RooCategory&)'
     _category_var = *(categories->get_category_var());

That comes from

@StephanH - do you still listen? Can you explain what the work around it? Should we add an entry to the release notes? :wink:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.