I'm looking at overloading an operator. Specifically, the parenthesis. But NOT someclass() parenthesis.. how would I overload this:
if(myclass)
? In this case, "myclass" would be evaluated to see if it is zero or non-zero, yes? Is that done by treating it as an unsigned that is either zero or greater-than, i.e. using whatever I have defined as the result of
0 < myclass
? Or is it evaluated by seeing if it is actually euqal to zero, i.e.
0 == myclass
? Or is it evaluated by seeing if it is NOT equal to zero, i.e.
0 <> myclass
Or is it compiler-dependant? Or some completely different method that I am missing from staring at this too long. . .
if(myclass)
? In this case, "myclass" would be evaluated to see if it is zero or non-zero, yes? Is that done by treating it as an unsigned that is either zero or greater-than, i.e. using whatever I have defined as the result of
0 < myclass
? Or is it evaluated by seeing if it is actually euqal to zero, i.e.
0 == myclass
? Or is it evaluated by seeing if it is NOT equal to zero, i.e.
0 <> myclass
Or is it compiler-dependant? Or some completely different method that I am missing from staring at this too long. . .