Created
January 14, 2017 08:46
-
-
Save mnaamani/44a33f6820e7a97d056fce455e77aee7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* test.pro | |
QT += core | |
QT -= gui | |
CONFIG += c++11 | |
TARGET = test | |
CONFIG += console | |
CONFIG -= app_bundle | |
TEMPLATE = app | |
SOURCES += main.cpp | |
*/ | |
#include <QCoreApplication> // compiler error only manifests when this is included | |
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; | |
} | |
/* Leads to wierd compiler errors: | |
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xstring(1596): error C3536: '_Mydata': cannot be used before it is initialized | |
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xstring(1596): error C2440: '<function-style-cast>': cannot convert from 'int' to 'std::_String_iterator<std::_String_val<std::_Simple_types<wchar_t>>>' | |
Build Environment: | |
OS: Windows 8.1 | |
Kit: Qt5.7.1 , msvc2015_64bit | |
Qt Creator 4.2.0 (4.2.0) - Based on Qt 5.7.1 (MSVC 2015, 32 bit) | |
// build files generated with qmake | |
qmake.exe test.pro -spec win32-msvc2015 | |
*/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment