Function.h should _not_ use `std::less`, `std::greater`, `std::less_equal`, `std::greater_equal`, `std::equal_to` and `std::not_equal_to`
The binary comparison operators defined in Function.h currently use eg. std::less
as Operator
when creating a ComposedFunctor<Operator,...>
. And ComposedFucntor
will use Operator
to actually do the comparison. But operators such as std::less
come with a bit of small print: namely their return value is bool
(see eg here. This is a problem when creating a comparison where one (or both) of the arguments is (are) a SIMD type(s), as then the return value should be the corresponding mask_v
. I'm a bit puzzled as to why this hasn't been spotted before, so I may still be wrong in this diagnosis...
Edited by Gerhard Raven