Visual Studio C / C++ standard flag
Visual Studio has distinct C / C++ language
standard flags
from most other compilers, including Intel oneAPI.
The build system like CMake normally sets the compiler language standard flags by variables like CMAKE_CXX_STANDARD or
target_compile_features
command.
Normally
feature test macros
should be used instead of checking the language standard version directly.
In particular,
MSVC _cplusplus macro
requires the /Zc:__cplusplus
flag to be set.
One way to determine what MSVC version added support for a particular C++ standard flag is to example CMake source code MSVC-CXX.cmake and MSVC-C.cmake.