2 ms·
c and d are considered equal, you have overridden the boolean operators, what the code is actually calling on your if statement is: c.bool() == d.bool() In th
by X-Istence 16y ago
c and d are considered equal, you have overridden the boolean operators, what the code is actually calling on your if statement is:
c.bool() == d.bool()
In this case both will return true since they are non-zero, and thus the statement would be
1 == 1
Which is true; the compiler did exactly as you told it to do.