The /std:c17 option enables ISO C17 conformance. It's available starting in Visual Studio 2019 version 16.8.
Visual Studio 2017 version 15.3/std:c++17 enables the set of C++17 features implemented by the compiler.
Visual Studio comes with its own C compiler, which is actually the C++ compiler. Just use the . c file extension to save your source code.
For a summary of new features and bug fixes in Visual Studio version 16.8, see What's New in Visual Studio 2019 version 16.8. C++20 Coroutines are now supported under /std:c++latest (or /std:c++20 starting in Visual Studio 2019 version 16.11) and the <coroutine> header.
The value of __cplusplus
is temporarily intentionally non-conformant by default for current versions of Visual Studio in order to avoid breaking existing code. It does not mean your compiler does not support any C++11 (or newer) features.
Quoting from MSVC now correctly reports __cplusplus:
/Zc:__cplusplus
You need to compile with the
/Zc:__cplusplus
switch to see the updated value of the__cplusplus
macro. We tried updating the macro by default and discovered that a lot of code doesn’t compile correctly when we change the value of__cplusplus
. We’ll continue to require use of the/Zc:__cplusplus
switch for all minor versions of MSVC in the 19.xx family.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With