illegal user defined conversion?
<p>here is the code and comment:</p>

<pre><code>template&lt;class T&gt;
struct B
{
    B(){}

    template&lt;class T1&gt; operator T1() { return T1(); }

    // define this macro if your compiler fails.
#if (defined USE_MORE_TIDOUS_WAY) // (defined _MSC_VER)
    template&lt;class T1&gt; explicit B(B&lt;T1&gt; const&amp; ) {}
    template&lt;class T1&gt; operator B&lt;T1&gt;() { return B&lt;T1&gt;(); }
#else
    template&lt;class T1&gt; B(B&lt;T1&gt; const&amp; ) {}
#endif


#if 0
    ////// Explanation:

    // firstly, I want to have this convserion ctor :
    template&lt;class T1&gt; B(B&lt;T1&gt; const&amp; ) {}

    // and the conversion function :
    template&lt;class T1&gt; operator T1() { return T1(); }

    // but may be T1 is too general, which could hide above
    // conversion ctor from some compilers (msvc8~10 fail, gcc 4.4.0~ is ok)

    // To overcome such case, add another conversion function :
    template&lt;class T1&gt; operator B&lt;T1&gt;() { return B&lt;T1&gt;(); }

    // and do not use conversion ctor, while we can still have ctor upon B&lt;T1&gt;
    template&lt;class T1&gt; explicit B(B&lt;T1&gt; const&amp; ) {}

#endif
};


// test cases

template&lt;class T&gt; void func(T const&amp;){};

void test()
{
    typedef B&lt;int&gt;      B1;
    typedef B&lt;float&gt;    B2; 

    B1 b1;
    B2 b2 = b1; // B1 =&gt; B2
    b1 = b2;    // B2 =&gt; B1
    b2 = b1;    // B1 =&gt; B2
    func&lt;B1&gt;(b2);   // B2 =&gt; B1
    func&lt;B2&gt;(b1);   // B1 =&gt; B2
}

int main()
{
    test();
}
</code></pre>

<p>So, which conversion is more standard conformed and preferred?</p>
