Constrain the boolean operators
dangelog opened this issue · 0 comments
dangelog commented
The convenience operators should be constrained to only take predicates or similar. Otherwise, if they're in scope, then all sorts of nonsense starts compiling:
using namespace KDAlgorithms::Operators;
std::string to_be;
to_be || !to_be; // that is the question
(Granted, one can't really use the return value of these operators, as it would immediately then trigger compilation errors)