more than one operator matches these operands
<p>Suppose we have next code:</p>

<pre><code>struct int64
{
    long long value;

    int64() : value(0) {}
    int64(signed char i8) : value(i8) {}
    int64(unsigned char u8) : value(u8) {}
    int64(short i16) : value(i16) {}
    int64(unsigned short u16) : value(u16) {}
    int64(int i32) : value(i32) {}
    int64(unsigned u32) : value(u32) {}
    int64(long long i64) : value(i64) {}
    int64(unsigned long long u64) : value(u64) {}
    int64(const int64&amp; i64) : value(i64.value) {}

    int64&amp; operator+=(const int64&amp; rhs) { return value += rhs.value, *this; }
    int64&amp; operator-=(const int64&amp; rhs) { return value -= rhs.value, *this; }

    friend int64 operator+(const int64&amp; lhs, const int64&amp; rhs) { return int64(lhs) += rhs; }
    friend int64 operator-(const int64&amp; lhs, const int64&amp; rhs) { return int64(lhs) -= rhs; }

    operator  char() const { return (char)value;  }
    operator short() const { return (short)value; }
    operator int() const { return (int)value; }
    operator long long() const { return value; }
};
</code></pre>

<p>when compiling the this code:</p>

<pre><code>int64 q = 500;
int64 m = q + 1024;
</code></pre>

<p>an error occurred because there is  4 similar conversion available to <code>1024</code> and one for <code>q</code> to integer type, to solve this problem, i removed the <code>operator XX</code> from the <code>int64</code> and added the following code:</p>

<pre><code>template &lt;typename n&gt;
operator n() const { return (n)value; }
</code></pre>

<p>now i can execute the following code:</p>

<pre><code>int64 q = 500;
int64 m = q + 1024;
short r = q;
</code></pre>

<p>the template definition works with <code>Visual C++</code> and <code>GCC</code> compilers but <code>Intel C++</code> compiler.</p>

<p>how can i write this conversion operators that work for those compilers?</p>
