
I have found another issue with these traits: it will not be possible to treat all combinations of built-in types that do not work with operators. Example: 1. % 1. is not allowed by the standard and cannot be redefined. Even the trick of an "any" class does not work. See below. There is still the possibility to specialize the traits for all built-in non working combinations... Frédéric #include <iostream> template <class T> struct any { any(const T&) { }; }; template <class T> double operator % (any<T> x, any<T> y) { std::cout << "my operator %\n" ; return 0.; } int main() { double x=1.; x=x%x; // compile time error -> error: invalid operands of types double and double to binary operator% x=any<double>(x)%any<double>(x); return 0.; }