-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
Check duplicate issues.
- Checked for duplicates
Description
ROOT::Experimental::RHistEngine<BinContentType>::Scale(double) must not be called for integral bin content types. This is enforced with a static_assert, but it is still possible to call the function when retrying.
Reproducer
root [0] ROOT::Experimental::RHistEngine<int> hist(10, {5.0, 15.0});
root [1] hist.Scale(1);
In module 'ROOTHist':
/home/jhahnfel/ROOT/build-asserts-clang/include/ROOT/RHistEngine.hxx:486:21: error: static assertion failed due to requirement '!std::is_integral_v<int>': scaling is not supported for integral bin content types
static_assert(!std::is_integral_v<BinContentType>, "scaling is not supported for integral bin content types");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ROOT_prompt_1:1:6: note: in instantiation of member function 'ROOT::Experimental::RHistEngine<int>::Scale' requested here
hist.Scale(1);
^
root [2] hist.Scale(1);
root [3]
ROOT version
master
Installation method
from source
Operating system
Linux
Additional context
The (possible) reason is that Scale is a non-templated method in the templated class RHistEngine. During unloading, we probably only take care of entire templated classes and templated methods (?).