cmake 3.21.2 set(CMAKE_CXX_STANDARD 20) incorrectly sets -std:c++20 for msvc.
cmake version 3.21.2
set(CMAKE_CXX_STANDARD 20)
sets -std:c++20
The issue is on my CI it has a newer version of cmake and an older version of msvc. On my pc I have older versions of both.
Maybe related: #18837
In versions of Visual Studio 2019 before version 16.11, /std:c++latest is required to enable all the compiler and standard library features of C++20.
Maybe the current the version on my ci doesn't support -std
maybe it needs /std
Version of the MSVC compiler version 19.29.30133 which I guess is Visual Studio 2019 16.11.
Hmm the error message doesn't match the documentation on Microsoft's site...
The contents of <ranges> are available only in c++latest mode with concepts support; see https://github.com/microsoft/STL/issues/1814 for details.
failed build log. log__1_.txt