Getting this error 'static_assert failed "Error in C++ Standard usage"' in Qt Creator Windows while building C++ application.
-
Hi Qt Team,
I am using Qt 6.4.2 in Windows 11 I have also installed MSVC2019 and also MinGW compiler. Both are working fine while I build the project. But while building with MSVC compiler in Qt creator I am getting static_assert failed "Error in C++ Standard usage" (its warning but pretending as an error) although it's not interrupting the build but I am not sure why it's coming, any idea ?
-
-
@rohit713
The error has nothing to do with Qt. It comes from Microsoft's C++ Standard Library implementation (STL, https://github.com/microsoft/STL).
Maybe try a more recent MSVC version. -
Because QtCreator is shipped with clangd 14, which is not compatible with vs2022, you need clangd 16 instead.
Goto "C:\Qt\Tools\QtCreator\bin\clang", try to replace with clangd related files from "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64" -
Qt Creator 13.0.x comes with LLVM 17. Just upgrade to https://download.qt.io/official_releases/qtcreator/13.0/