I have a simple structure in C ++ 11
struct a { int a; int b; int c; .... }
I would like to use this structure as if it were a scalar type, so I overloaded all the operators.
One behavior that I cannot find how to determine is the use of structure in an if statement:
av = {1,2,3}; if (v) { }
Is there such an operator that I can overload to enable this behavior? I want a standard behavior: if any bit is 1 in the structure, this is true, otherwise it is false.
source share