Up to and including Visual C++ 11 (I only have the preview of that compiler) the following code fails to compile:#ifdef _MSC_VER# pragma warning( disable: 4480 ) // enum base as "nonstandard extension"#endifenum ShouldBeFine: char { hola };enum Choice { a, b, c };template< Choice c > struct Traits;template<> struct Traits<a> { typedef char Type; };template<> struct Traits<b> { typedef wchar_t Type; };template<> struct Traits<c> { typedef long Type; };template< Choice c >struct Blah{ enum X: typename Traits<c>::Type {};};int main(){}
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...