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?

Thanks.

@Seophine I checked assignment operator operator= for RooCategory and it is still available in current master docs as well as in 6.22: https://root.cern.ch/doc/master/classRooCategory.html or https://root.cern.ch/doc/v622/classRooCategory.html

@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 https://github.com/root-project/root/commit/560f59fbc0c5c6434ed11453954400be3e87fdb7

@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.