Qt 6.11 is out! See what's new in the release
blog
Qt with VS 2013
General and Desktop
4
Posts
3
Posters
1.8k
Views
1
Watching
-
Using this code:
using LISTSTR = std::list< std::wstring>;I am getting these errors
error: C2143: syntax error : missing ';' before '='
error: C2873: 'LISTSTR' : symbol cannot be used in a using-declaration
error: C2513: 'int' : no variable declared before '='This code compiles without any problems under VS2015/13
-
@Papa said:
using LISTSTR = std::list< std::wstring>;
Type alias declarations are C++11 features. C++11 is not (yet) enabled by default, so you have to turn it on by adding the following to your *.pro file:
CONFIG += c++11 -
Qt Creator added that line in the .pro file.
In my code I added#if ((_MSC_VER >= 1600) || (GCC_VERSION >= 40902)) //if C++11 using LISTSTR = std::list< std::wstring>; #else typedef std::list< std::string > LISTSTR; #endifThe Creator Intelisence recognized the the statement with the 'using' key-word, but the compiler does not and issues a error message.
-
This post is deleted!