title: Template function inside template class
body: <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 can I do this? What is the correct syntax?</p>