I\'m currently using C++11 features in my Qt applications. However, I\'d like to use some of the new C++14 features in my applications.
To enable C++11 in a Qt appli
For some weird reason this is what Qt does:
If the compiler is gcc or mingw, CONFIG+=C++14
is transformed to a compiler flag -std=c++14
(that what you expect)
If it's another compiler (like clang), CONFIG=C++14
is stupidly transformed to -std=c++11
(sic!), so you will get errors about unsupported features, even if your clang version correctly supports C++14.
To fix it, specify the flag explicitly:
QMAKE_CXXFLAGS += -std=c++14
This way, you're sure that your compiler (g++, mingw or clang) will receive the correct flags.