Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

decltype issue in 15.0

$
0
0

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.


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>