Solved Can not use c++latest with 5.15.2 and MSVC
-
Hello all!
I have the aforementioned issue with the following setup:
OS: Windows 10 Home, 20H2, build 19042.928
Compiler: Microsoft Visual C++ Compiler 16.8.30717.126
QT: Qt 5.15.2 MSVC2019 64bitMy project *.pro file has the following line:
CONFIG += c++2a
(I have also tried c++latest)
I want to use designated initializers, e.g.
SomeStruct {.someField = someValue};
But I have the following error:
error: C7555: use of designated initializers requires at least '/std:c++latest'
What's the problem in my case? Thank you in advance!
-
@St-Stanislav You could try
QMAKE_CXXFLAGS += /std:c++latest
-
@St-Stanislav You could try
QMAKE_CXXFLAGS += /std:c++latest
-
@KroMignon Thank you! It made everything well. Looks like that Windows or VS update broke this, because it worked well two days ago only with c++2a flag.