if (var) ... uses number conversion instead of boolean
<p>Why if (var) ... uses number conversion instead of boolean ?
I have a class that implements both :</p>

<pre><code>operator int() { ....}
operator bool() { ....}
</code></pre>

<p>but if I use :</p>

<pre><code>if (my_class_var) ....;
</code></pre>

<p>then the <code>int</code> conversion is used instead of <code>boolean</code> ?!!?!</p>

<p>EDIT:
As versedmarald say it is correct. I found what was the differnce.. I'm in fact using :</p>

<pre><code>operator int() { ....}
operator bool() const { ... }
</code></pre>

<p>Still mesmerized, why the difference ?
gcc version 4.6.2</p>
