#include <string> //remove this header to remove the compiler error template<class T> class A { public: A(){} }; template<class T> using AA = A<T>; //duplicate using statement template<class T> using AA = A<T>; int main(int argc, char *argv[]) { // template instantiation not required to produce error //AA<int> a; return 0; }
Compiling this code with:
cl main.cpp /EHsc
Results in strange compiler errors (and only if the string header is included)
Using msbuild tools: compiler version: 19.00.24210 for x64 on windows 8.1 with windows 8 SDK installed.
Can anyone reproduce this?
Mokhtar