Skip to content

Commit 8f8d919

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents d439615 + 7156e4e commit 8f8d919

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ The **`/std:c++17`** option enables C++17 standard-specific features and behavio
4444
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).
4545

4646
**`/std:c++20`**\
47-
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, with the exception of `std::format` and the C++20 `<chrono>` extensions. These features are still only available under **`/std:c++latest`**. 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.
47+
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, with the exception of `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`**.
48+
49+
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.
4850

4951
**`/std:c++latest`**\
5052
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.

docs/overview/visual-cpp-language-conformance.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,15 @@ A more detailed listing of Standard Library features and bug fixes by product ve
379379
| &emsp;[`P1135R6 The C++20 Synchronization Library`](https://wg21.link/P1135R6) | VS 2019 16.9 <sup>[20](#note_20)</sup> |
380380
| &emsp;[`P1771R1 Library support for [[nodiscard]] for constructors`](https://wg21.link/P1771R1) | VS 2019 16.9 <sup>[20](#note_20)</sup> |
381381
| &emsp;[`P0053R7 <syncstream>`](https://wg21.link/p0053r7)<br/>&emsp;[`P0753R2 osyncstream Manipulators`](https://wg21.link/p0753r2) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
382-
| &emsp;[`P0355R7 <chrono> Calendars And Time Zones`](https://wg21.link/p0355r7) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
382+
| &emsp;[`P0355R7 <chrono> Calendars And Time Zones`](https://wg21.link/p0355r7) | VS 2019 16.10 <sup>[20abi](#note_20abi)</sup> |
383383
| &emsp;[`P0408R7 Efficient access To basic_stringbuf's buffer`](https://wg21.link/p0408r7) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
384384
| &emsp;[`P0466R5 Library support for layout-compatibility and pointer-interconvertibility traits`](https://wg21.link/p0466r5) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
385385
| &emsp;[`P0475R1 Guaranteed Copy Elision For Piecewise Construction`](https://wg21.link/P0475R1) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
386386
| &emsp;[`P0591R4 Utility Functions For Uses-Allocator Construction`](https://wg21.link/P0591R4) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
387387
| &emsp;[`P0608R3 Improving variant's Converting Constructor/Assignment`](https://wg21.link/P0608R3) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
388-
| &emsp;[`P0645R10 <format> Text Formatting`](https://wg21.link/p0645r10) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
388+
| &emsp;[`P0645R10 <format> Text Formatting`](https://wg21.link/p0645r10) | VS 2019 16.10 <sup>[20abi](#note_20abi)</sup> |
389389
| &emsp;[`P0784R7 Library support for more constexpr containers`](https://wg21.link/P0784R7) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
390-
| &emsp;[`P0896R4 <ranges>`](https://wg21.link/P0896R4) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
390+
| &emsp;[`P0896R4 <ranges>`](https://wg21.link/P0896R4) | VS 2019 16.10 <sup>[20abi](#note_20abi)</sup> |
391391
| &emsp;[`P0980R1 constexpr std::string`](https://wg21.link/P0980R1) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
392392
| &emsp;[`P1004R2 constexpr std::vector`](https://wg21.link/P1004R2) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
393393
| &emsp;[`P1208R6 <source_location>`](https://wg21.link/P1208R6) | VS 2019 16.10 <sup>[20](#note_20)</sup> |
@@ -520,6 +520,8 @@ These algorithms aren't presently parallelized:
520520

521521
<a name="note_20"></a> __20__ In versions through Visual Studio 2019 version 16.10, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. Visual Studio 2019 version 16.11 added the [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) compiler option to enable these features.
522522

523+
<a name="note_20abi"></a> __20abi__ Because of ongoing post-release work on the C++20 standard, `<format>`, the formatting parts of `<chrono>` (which rely on `<format>`), and the range factories and range adaptors from `<ranges>` (everything that needs the `view` concept) are only available under **`/std:c++latest`**. We'll make these features available under **`/std:c++20`** after reaching agreement with WG21 that no further ABI-breaking changes are necessary. The remaining parts of `<chrono>` and the algorithms that apply to ranges are enabled under the **`/std:c++20`** compiler option starting in Visual Studio 2019 version 16.11.
524+
523525
<a name="note_DR"></a> __DR__ These features are enabled in all C++ [`/std`](../build/reference/std-specify-language-standard-version.md) compiler option modes. The C++ Standard committee adopted this change as a retroactive Defect Report to C++11 and all later versions.
524526

525527
<a name="note_C11"></a> __C11__ Compiler support for C11 and C17 requires Visual Studio 2019 version 16.8 or higher. Except as noted, C11 and C17 library support requires Windows 10 SDK build 10.0.20211.0 or higher. For more information on how to install support for C11 and C17, see [Install C11 and C17 support in Visual Studio](./install-c17-support.md).

docs/standard-library/ranges.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ std::transform(intermediate.begin(), intermediate.end(), std::back_inserter(outp
3131
With ranges, you can accomplish the same thing without needing the `intermediate` vector:
3232
3333
```cpp
34-
// requires /std:c++20 or /std:c++latest
34+
// requires /std:c++latest
3535
std::vector<int> input = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
3636
3737
auto output = input | std::views::filter([](const int n) {return n % 3 == 0; }) | std::views::transform([](const int n) {return n * n; });
@@ -44,7 +44,7 @@ In the code above, each element that is divisible by three is combined with an o
4444
The result, `output`, is itself a type of range called a view, which is discussed next.
4545

4646
> [!NOTE]
47-
> The ranges examples require the [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) or later compiler option.
47+
> The ranges examples require the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. Because post-release updates to `<ranges>` in the C++20 Standard are a work in progress, the features that require `std::views` aren't enabled yet under **`/std:c++20`**.
4848
4949
## Views
5050

@@ -57,7 +57,7 @@ Views are composable. In the example above, the view of vector elements that are
5757
The elements of a view are evaluated lazily. That is, the transformations you apply to yield the elements in a view aren't evaluated until you ask for an element. For example, if you run the following code in a debugger, and put a breakpoint on the lines `auto divisible_by_three = ...` and `auto square = ...`, you'll see that you hit the `divisible_by_three` lambda breakpoint as each element in `input` is tested for divisibility by three. The `square` lambda breakpoint will be hit as the elements that are divisible by three are squared.
5858

5959
```cpp
60-
// requires /std:c++20 or /std:c++latest
60+
// requires /std:c++latest
6161
#include <ranges>
6262
#include <vector>
6363
#include <iostream>

0 commit comments

Comments
 (0)