Compiling error on template method, return is instance from inner class
<p>Here is a simplified example:</p>

<pre><code>template&lt;typename T&gt;
class MyTemplate
{
  class Inner {};
  Inner met();
};

template&lt;typename T&gt;
MyTemplate&lt;T&gt;::Inner  MyTemplate&lt;T&gt;::met()
{ }
</code></pre>

<p>I get the following compilation error:</p>

<pre><code>expected constructor, destructor, or type conversion before 'met'
</code></pre>

<p>I use GCC. It seems the compiler doesn't recognize MyTemplate&lt;T>::Inner as a proper class. How can I fix this? I've tried sticking the typename keyword here and there to no avail. Right now, the only way I can manage to compile this is to inline the method definition in the class declaration, which I would like to avoid.</p>

<p>Thanks!</p>
