Qt 5.6: QMAKE and CONFIG = C++11 - is it safe to remove this?
-
After upgrading to Qt 5.6 I was annoyed to learn that CONFIG had C++11 flag set by default. Not only it overrode my
*g++*:QMAKE_CXXFLAGS += -std=c++1y
, but also used the gnu version of the standard, which is not what I want.So, my question is: does this config value change anything else other than the
-std=
flag? If yes, how do I get my desired behaviour (compilation in standard-compliant mode with a recent standard, like 14 or 17)? -
Hi!
It is not clear to me: do you mean Qt 5.6 is built with C++11 support or where is this flag set by default?
Did you try CONFIG += c++14? -
Hi!
It is not clear to me: do you mean Qt 5.6 is built with C++11 support or where is this flag set by default?
Did you try CONFIG += c++14? -
@krzaq I'm surprised anything changed at all with the c++14 flag. Are you using 5.6.0-rc ? In my case
CONFIG += c++11 c++14
doesn't seem to do anything at all when compiling to Android. I'm using 5.6.0-rc and withCONFIG += c++11 c++14
I'm just getting-std=c++11
.With Qt 5.5.1
CONFIG += c++11 c++14
I get-std=c++1y
added to the mix and I can use relevant functionality (std::make_unique).