Skip to content

Commit 36f308e

Browse files
authored
Update std-specify-language-standard-version.md
* _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.
1 parent 45a97ad commit 36f308e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/build/reference/std-specify-language-standard-version.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,21 @@ The **`/std:c++17`** option enables C++17 standard-specific features and behavio
5050
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).
5151

5252
**`/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.
5454

5555
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.
5656

57+
The **`/std:c++20`** option enables the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overriden with **`/permissive`**.
58+
5759
**`/std:c++latest`**\
5860
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.
5961

6062
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).
6163

6264
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.
6365

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+
6468
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).
6569

6670
The **`/std:c++latest`** option doesn't enable features guarded by the **`/experimental`** switch, but may be required to enable them.

0 commit comments

Comments
 (0)