conversion operator and operator>>
<p>I have a program following:</p>

<pre><code>class INT {
public:
  INT(int ii = 0) : i(ii) {}
  operator int() { return i; }
private:
  int i;
};

int main()
{
  INT i;
  cin &gt;&gt; i;
}
</code></pre>

<p>the statement <code>cin &gt;&gt; i</code> is compiled error, but I don't know the reason?</p>

<p>In my option, the compiler can find the function <code>cin.operator&gt;&gt;(int&amp;)</code> for that statement, since <code>INT</code> can be converted to <code>int</code> through <code>INT::operator int()</code>.</p>
