|
[Rivet] inRange troubleHendrik Hoeth hendrik.hoeth at cern.chThu Sep 22 10:55:42 BST 2011
Thus spake Andy Buckley (andy.buckley at ed.ac.uk): > >So, what do we do? Right now the function is templated, so that the > >first three arguments have the same type. Adding an inRange(double,<T>,<T>) > >won't work, because it introduces an ambiguity. Getting rid of the > >templates altogether means we need to introduce a loooong list of > >inRange functions. > > Do we really? If we have an explicit (int, int, int) and a (double, > double, double), won't implicit conversion do the rest? ATLAS_2011_I919017.cc:780:42: error: call of overloaded 'inRange(double, int, int)' is ambiguous ATLAS_2011_I919017.cc:780:42: note: candidates are: ../../include/Rivet/Math/MathUtils.hh:108:15: note: bool Rivet::inRange(double, double, double, Rivet::RangeBoundary, Rivet::RangeBoundary) ../../include/Rivet/Math/MathUtils.hh:132:15: note: bool Rivet::inRange(int, int, int, Rivet::RangeBoundary, Rivet::RangeBoundary) -- A man without a dream in his heart already has one foot in the grave.
More information about the Rivet mailing list |