Implicit conversion of lefthand argument in in-class declared friend operator
问题 I am using CRTP to provide template-argument dependent addition of functions to a class, in this case the addition of operator + and operator += , using the template class ImplAdd . For the former, implicit conversions should be performed on both arguments, which means I have to use an in-class friend operator like this: template<class Type, bool active> struct ImplAdd{ virtual int get_val_() const = 0; virtual void set_val_(int) = 0; }; //if activated is true, the operators + and += will be