The following code generates an error:
template<typename T>
class A
{
static T m;
};
template<typename T>
decltype(A<T>::m) A<T>::m;
The error message is: declaration is incompatible with "T A<T>::m" (declared at line 4)
I use MSVC2013 and the "v120" base platform toolset.
The code works with both Microsoft compiler versions (v120 and CTP_Nov2013).
I'm wondering if this is just a Microsoft extension or if there's a bug in your compiler.