- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems to me to be a compatibiliy bug in the Intel Compiler and I'm going to file a bug reqport. The Microsoft compiler is correct.
Regards, Hubert.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your observation is right. The Intel compilers fails compiling the code. I'll check.
Regards, Hubert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems to me to be a compatibiliy bug in the Intel Compiler and I'm going to file a bug reqport. The Microsoft compiler is correct.
Regards, Hubert.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page