Explicit specialization of non-class, non-function members of a class template
<p>Look at the code:</p>

<pre><code>template &lt;class x&gt; struct Foo
{
    int getX(x *p) { return(0); }
    enum E12 { a };
};

template &lt;&gt; int Foo&lt;int&gt;::getX(int*)
{
    return(-15);
}

template &lt;&gt; enum Foo&lt;int&gt;::E12
{
    a, b, c
}
</code></pre>

<p>As it was discussed in <a href="http://stackoverflow.com/questions/11268535/cannot-overload-function">Cannot overload function</a>, the first specialization is legal and even works in MSVC. While the second specialization for <code>enum</code> does not even want to compile, saying "error C2988: unrecognizable template declaration/definition".</p>

<p>It seems to me that C++ is making relaitively unlogical exception for methods. Enum is just an example. The same thing can be applied to member classes, typedefs, etc.</p>

<p>I will be happy is some body will comment on this.</p>
