Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

Duplicate Template Alias Compiler Bug?

$
0
0
#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


Viewing all articles
Browse latest Browse all 2763

Trending Articles



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