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
Copy file name to clipboardExpand all lines: docs/build/reference/std-specify-language-standard-version.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,9 @@ The **`/std:c++17`** option enables C++17 standard-specific features and behavio
44
44
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).
45
45
46
46
**`/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.
48
50
49
51
**`/std:c++latest`**\
50
52
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.
Copy file name to clipboardExpand all lines: docs/overview/visual-cpp-language-conformance.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -379,15 +379,15 @@ A more detailed listing of Standard Library features and bug fixes by product ve
379
379
| [`P1135R6 The C++20 Synchronization Library`](https://wg21.link/P1135R6)| VS 2019 16.9 <sup>[20](#note_20)</sup> |
380
380
| [`P1771R1 Library support for [[nodiscard]] for constructors`](https://wg21.link/P1771R1)| VS 2019 16.9 <sup>[20](#note_20)</sup> |
381
381
| [`P0053R7 <syncstream>`](https://wg21.link/p0053r7)<br/> [`P0753R2 osyncstream Manipulators`](https://wg21.link/p0753r2)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
382
-
| [`P0355R7 <chrono> Calendars And Time Zones`](https://wg21.link/p0355r7)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
382
+
| [`P0355R7 <chrono> Calendars And Time Zones`](https://wg21.link/p0355r7)| VS 2019 16.10 <sup>[20abi](#note_20abi)</sup> |
383
383
| [`P0408R7 Efficient access To basic_stringbuf's buffer`](https://wg21.link/p0408r7)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
384
384
| [`P0466R5 Library support for layout-compatibility and pointer-interconvertibility traits`](https://wg21.link/p0466r5)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
385
385
| [`P0475R1 Guaranteed Copy Elision For Piecewise Construction`](https://wg21.link/P0475R1)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
386
386
| [`P0591R4 Utility Functions For Uses-Allocator Construction`](https://wg21.link/P0591R4)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
387
387
| [`P0608R3 Improving variant's Converting Constructor/Assignment`](https://wg21.link/P0608R3)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
388
-
| [`P0645R10 <format> Text Formatting`](https://wg21.link/p0645r10)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
388
+
| [`P0645R10 <format> Text Formatting`](https://wg21.link/p0645r10)| VS 2019 16.10 <sup>[20abi](#note_20abi)</sup> |
389
389
| [`P0784R7 Library support for more constexpr containers`](https://wg21.link/P0784R7)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
390
-
| [`P0896R4 <ranges>`](https://wg21.link/P0896R4)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
390
+
| [`P0896R4 <ranges>`](https://wg21.link/P0896R4)| VS 2019 16.10 <sup>[20abi](#note_20abi)</sup> |
391
391
| [`P0980R1 constexpr std::string`](https://wg21.link/P0980R1)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
392
392
| [`P1004R2 constexpr std::vector`](https://wg21.link/P1004R2)| VS 2019 16.10 <sup>[20](#note_20)</sup> |
393
393
| [`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:
520
520
521
521
<aname="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.
522
522
523
+
<aname="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
+
523
525
<aname="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.
524
526
525
527
<aname="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).
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
44
44
The result, `output`, is itself a type of range called a view, which is discussed next.
45
45
46
46
> [!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`**.
48
48
49
49
## Views
50
50
@@ -57,7 +57,7 @@ Views are composable. In the example above, the view of vector elements that are
57
57
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.
0 commit comments