With all of the fundamental types of C++, one can simply query:
if(varname)
and the type is converted to a boolean for evaluation. Is there
C++ checks if the statements result is whether equal to zero nor not. So i think you can define equality operator for your class and define how your class will be different from zero in which conditions.