You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* _All_ c++20 Standard Library features have been available with `/std:c++20` since 17.2 and in 16.11 per https://devblogs.microsoft.com/cppblog/msvcs-stl-completes-stdc20/ , leaving 17.0 as a special case.
* `/std:c++20` has always implied `/permissive-`, which fact we should mention here.
* `/std:c++latest` has also implied `/permissive-` since we added `/std:c++20` but not in earlier releases.
Copy file name to clipboardExpand all lines: docs/build/reference/std-specify-language-standard-version.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -50,17 +50,21 @@ The **`/std:c++17`** option enables C++17 standard-specific features and behavio
50
50
Depending on the MSVC compiler version or update level, C++17 features may not be fully implemented or fully conforming when you specify the **`/std:c++17`** option. For an overview of C++ language conformance in Visual C++ by release version, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md).
51
51
52
52
**`/std:c++20`**\
53
-
The **`/std:c++20`** option enables C++20 standard-specific features and behavior. Available starting in Visual Studio 2019 version 16.11, it enables the full set of C++20 features implemented by the MSVC compiler, except for `std::format`, the C++20 `<chrono>` formatting extensions, and the range factories and range adaptors from `<ranges>`. These features are still only available under **`/std:c++latest`**.
53
+
The **`/std:c++20`** option enables C++20 standard-specific features and behavior. Available starting in Visual Studio 2019 version 16.11, it enables the full set of C++20 features implemented by the MSVC compiler. Note that Visual Studio 2022 version 17.0 does not support `std::format`, the C++20 `<chrono>` formatting extensions, and the range factories and range adaptors from `<ranges>` under **`/std:c++20`** due to late-breaking changes in those features immediately after publication of the Standard. These features are available in Visual Studio 2022 version 17.0 under **`/std:c++latest`** in an in-progress form, but we recommend updating to a later version of Visual Studio 2022 in which they are stable (as in Visual Studio 2019 version 16.11) to avoid breaking changes.
54
54
55
55
The **`/std:c++20`** option disables compiler and standard library support for features that are new or changed after C++20. It specifically disables post-C++20 changes in the C++ Standard and versions of the Working Draft. It doesn't disable retroactive defect updates of the C++ Standard.
56
56
57
+
The **`/std:c++20`** option enables the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overriden with **`/permissive`**.
58
+
57
59
**`/std:c++latest`**\
58
60
The **`/std:c++latest`** option enables all currently implemented compiler and standard library features proposed for the next draft standard, as well as some in-progress and experimental features. This option is available starting in Visual Studio 2015 Update 3.
59
61
60
62
Depending on the MSVC compiler version or update level, C++17, C++20, or proposed C++23 features may not be fully implemented or fully conforming when you specify the **`/std:c++latest`** option. We recommend you use the latest version of Visual Studio for maximum standards conformance. For an overview of C++ language and library conformance in Visual C++ by release version, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md).
61
63
62
64
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.
63
65
66
+
Since Visual Studio 2019 version 16.11, the **`/std:c++latest`** option has enabled the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overriden with **`/permissive`**.
67
+
64
68
For a list of supported language and library features, see [What's New for C++ in Visual Studio](../../overview/what-s-new-for-visual-cpp-in-visual-studio.md).
65
69
66
70
The **`/std:c++latest`** option doesn't enable features guarded by the **`/experimental`** switch, but may be required to enable them.
0 commit comments