C++ template function inside template class
<p>I have this code:</p>

<pre><code>    template &lt;class T&gt;
    class MyClass {
        public:
            template &lt;class U&gt;
            void foo() {
                U a;
                a.invoke();
            }
    };
</code></pre>

<p>I want it in this form:                                               </p>

<pre><code>    template &lt;class T&gt;
    class MyClass {
        public:
            template &lt;class U&gt;
            void foo();
    };

    template &lt;class T&gt; /* ????? */
    void MyClass&lt;T&gt;::foo() {
        U a;
        a.invoke();
    }
</code></pre>

<p>How I can to do this? What is the right syntax?</p>
