what is "operator T*(void)" and when it is invoked?
<p>I have 2 files:</p>

<pre><code>/****demo.cpp****/
#include &lt;iostream.h&gt;
#include "gc.h"

class foo{};

int main(){
    gc&lt;foo&gt; x1;
    cout&lt;&lt;x1;
}

/*****gc.h*****/
template &lt;class T&gt; class gc 
{
    T* ptr;
public:
    operator T*(){}
};
</code></pre>

<p>If I don't write <code>operator T*(){}</code> then I get a lot of compiler errors.</p>

<p>So plz tell me what is <code>operator T*(void)</code> and when it is invoked?</p>
