diff --git a/docs/build/reference/compiler-options-listed-alphabetically.md b/docs/build/reference/compiler-options-listed-alphabetically.md
index 2aea452174c..462eaf975a5 100644
--- a/docs/build/reference/compiler-options-listed-alphabetically.md
+++ b/docs/build/reference/compiler-options-listed-alphabetically.md
@@ -53,6 +53,7 @@ This table contains an alphabetical list of compiler options. For a list of comp
| [`/FR`](fr-fr-create-dot-sbr-file.md)
[`/Fr`](fr-fr-create-dot-sbr-file.md) | Generates browser files. **`/Fr`** is deprecated. |
| [`/FS`](fs-force-synchronous-pdb-writes.md) | Forces serialization of all writes to the program database (PDB) file through MSPDBSRV.EXE. |
| [`/fsanitize`](fsanitize.md) | Enables compilation of sanitizer instrumentation such as AddressSanitizer. |
+| [`/fsanitize-coverage`](fsanitize-coverage.md) | Enables compilation of code coverage instrumentation for libraries such as LibFuzzer. |
| [`/FU`](fu-name-forced-hash-using-file.md) | Forces the use of a file name as if it had been passed to the [`#using`](../../preprocessor/hash-using-directive-cpp.md) directive. |
| [`/Fx`](fx-merge-injected-code.md) | Merges injected code with source file. |
| [`/GA`](ga-optimize-for-windows-application.md) | Optimizes code for Windows application. |
diff --git a/docs/build/reference/compiler-options-listed-by-category.md b/docs/build/reference/compiler-options-listed-by-category.md
index ec95e10c9b3..8ff74ddebca 100644
--- a/docs/build/reference/compiler-options-listed-by-category.md
+++ b/docs/build/reference/compiler-options-listed-by-category.md
@@ -169,6 +169,7 @@ This article contains a categorical list of compiler options. For an alphabetica
| [`/FC`](fc-full-path-of-source-code-file-in-diagnostics.md) | Displays the full path of source code files passed to *cl.exe* in diagnostic text. |
| [`/FS`](fs-force-synchronous-pdb-writes.md) | Forces writes to the PDB file to be serialized through *MSPDBSRV.EXE*. |
| [`/fsanitize`](fsanitize.md) | Enables compilation of sanitizer instrumentation such as AddressSanitizer. |
+| [`/fsanitize-coverage`](fsanitize-coverage.md) | Enables compilation of code coverage instrumentation for libraries such as LibFuzzer. |
| [`/H`](h-restrict-length-of-external-names.md) | Deprecated. Restricts the length of external (public) names. |
| [`/HELP`](help-compiler-command-line-help.md) | Lists the compiler options. |
| [`/J`](j-default-char-type-is-unsigned.md) | Changes the default **`char`** type. |
diff --git a/docs/build/reference/fp-specify-floating-point-behavior.md b/docs/build/reference/fp-specify-floating-point-behavior.md
index ed48ef13ad8..d23d5228430 100644
--- a/docs/build/reference/fp-specify-floating-point-behavior.md
+++ b/docs/build/reference/fp-specify-floating-point-behavior.md
@@ -12,20 +12,54 @@ Specifies how the compiler treats floating-point expressions, optimizations, and
## Syntax
+::: moniker range=">msvc-160"
+
+**`/fp:contract`**
+**`/fp:except`**\[**`-`**]\
+**`/fp:fast`**\
**`/fp:precise`**\
**`/fp:strict`**\
-**`/fp:fast`**\
+
+::: moniker-end
+::: moniker range="<=msvc-160"
+
**`/fp:except`**\[**`-`**]
+**`/fp:fast`**\
+**`/fp:precise`**\
+**`/fp:strict`**\
+
+::: moniker-end
### Arguments
+::: moniker range=">msvc-160"
+
+#### `/fp:contract`
+
+The **`/fp:contract`** option allows the compiler to generate floating-point contractions when you specify the **`/fp:precise`** and **`/fp:except`** options. A *contraction* is a machine instruction that combines floating-point operations, such as Fused-Multiply-Add (FMA). FMA, defined as a basic operation by IEEE-754, doesn't round the intermediate product before the addition, so the result can differ from separate multiplication and addition operations. Since it's implemented as a single instruction, it can be faster than separate instructions. The speed comes at a cost of bitwise exact results, and an inability to examine the intermediate value.
+
+By default, the **`/fp:fast`** option enables **`/fp:contract`**. The **`/fp:contract`** option isn't compatible with **`/fp:strict`**.
+
+The **`/fp:contract`** option is new in Visual Studio 2022.
+
+::: moniker-end
+
#### `/fp:precise`
By default, the compiler uses **`/fp:precise`** behavior.
Under **`/fp:precise`**, the compiler preserves the source expression ordering and rounding properties of floating-point code when it generates and optimizes object code for the target machine. The compiler rounds to source code precision at four specific points during expression evaluation: at assignments, typecasts, when floating-point arguments get passed to a function call, and when a function call returns a floating-point value. Intermediate computations may be performed at machine precision. Typecasts can be used to explicitly round intermediate computations.
-The compiler doesn't perform algebraic transformations on floating-point expressions, such as reassociation or distribution, unless it can guarantee the transformation produces a bitwise identical result. Expressions that involve special values (NaN, +infinity, -infinity, -0.0) are processed according to IEEE-754 specifications. For example, `x != x` evaluates to **`true`** if `x` is NaN. Floating-point *contractions*, machine instructions that combine floating-point operations, may be generated under **`/fp:precise`**.
+::: moniker range=">msvc-160"
+
+The compiler doesn't perform algebraic transformations on floating-point expressions, such as reassociation or distribution, unless it can guarantee the transformation produces a bitwise identical result. Expressions that involve special values (NaN, +infinity, -infinity, -0.0) are processed according to IEEE-754 specifications. For example, `x != x` evaluates to **`true`** if `x` is NaN. Floating-point contractions aren't generated by default under **`/fp:precise`**. This behavior is new in Visual Studio 2022. Previous compiler versions could generate contractions by default under **`/fp:precise`**.
+
+::: moniker-end
+::: moniker range="<=msvc-160"
+
+The compiler doesn't perform algebraic transformations on floating-point expressions, such as reassociation or distribution, unless it can guarantee the transformation produces a bitwise identical result. Expressions that involve special values (NaN, +infinity, -infinity, -0.0) are processed according to IEEE-754 specifications. For example, `x != x` evaluates to **`true`** if `x` is NaN. Floating-point contractions may be generated under **`/fp:precise`**.
+
+::: moniker-end
The compiler generates code intended to run in the [default floating-point environment](#the-default-floating-point-environment). It also assumes the floating-point environment isn't accessed or modified at runtime. That is, it assumes the code doesn't unmask floating-point exceptions, read or write floating-point status registers, or change rounding modes.
@@ -49,7 +83,7 @@ Under **`/fp:fast`**, the compiler generates code intended to run in the default
#### `/fp:except`
-The **`/fp:except`** option generates code to ensures that any unmasked floating-point exceptions are raised at the exact point at which they occur, and that no other floating-point exceptions are raised. By default, the **`/fp:strict`** option enables **`/fp:except`**, and **`/fp:precise`** doesn't. The **`/fp:except`** option isn't compatible with **`/fp:fast`**. The option can be explicitly disabled by us of **`/fp:except-`**.
+The **`/fp:except`** option generates code to ensures that any unmasked floating-point exceptions are raised at the exact point at which they occur, and that no other floating-point exceptions are raised. By default, the **`/fp:strict`** option enables **`/fp:except`**, and **`/fp:precise`** doesn't. The **`/fp:except`** option isn't compatible with **`/fp:fast`**. The option can be explicitly disabled by use of **`/fp:except-`**.
By itself, **`/fp:except`** doesn't enable any floating-point exceptions. However, it's required for programs to enable floating-point exceptions. For more information on how to enable floating-point exceptions, see [`_controlfp`](../../c-runtime-library/reference/control87-controlfp-control87-2.md).
@@ -63,11 +97,26 @@ The [`/Za`](za-ze-disable-language-extensions.md) (ANSI compatibility) option is
The compiler provides three pragma directives to override the floating-point behavior specified on the command line: [`float_control`](../../preprocessor/float-control.md), [`fenv_access`](../../preprocessor/fenv-access.md), and [`fp_contract`](../../preprocessor/fp-contract.md). You can use these directives to control floating-point behavior at function-level, not within a function. These directives don't correspond directly to the **`/fp`** options. This table shows how the **`/fp`** options and pragma directives map to each other. For more information, see the documentation for the individual options and pragma directives.
-| Option | float_control(precise) | float_control(except) | fenv_access | fp_contract |
+::: moniker range=">msvc-160"
+
+| Option | `float_control(precise, *)` | `float_control(except, *)` | `fenv_access(*)` | `fp_contract(*)` |
+|--|--|--|--|--|
+| `/fp:fast` | `off` | `off` | `off` | `on` |
+| `/fp:precise` | `on` | `off` | `off` | `off`\* |
+| `/fp:strict` | `on` | `on` | `on` | `off` |
+
+\* In versions of Visual Studio before Visual Studio 2022, the **`/fp:precise`** behavior defaulted to `fp_contract(on)`.
+
+::: moniker-end
+::: moniker range=">msvc-160"
+
+| Option | `float_control(precise, *)` | `float_control(except, *)` | `fenv_access(*)` | `fp_contract(*)` |
|--|--|--|--|--|
-| `/fp:fast` | off | off | off | on |
-| `/fp:precise` | on | off | off | on |
-| `/fp:strict` | on | on | on | off |
+| `/fp:fast` | `off` | `off` | `off` | `on` |
+| `/fp:precise` | `on` | `off` | `off` | `on` |
+| `/fp:strict` | `on` | `on` | `on` | `off` |
+
+::: moniker-end
### The default floating point environment
diff --git a/docs/build/reference/fsanitize-coverage.md b/docs/build/reference/fsanitize-coverage.md
new file mode 100644
index 00000000000..8232ceb89d7
--- /dev/null
+++ b/docs/build/reference/fsanitize-coverage.md
@@ -0,0 +1,86 @@
+---
+description: "Learn more about the /fsanitize-coverage (Configure sanitizer coverage) compiler option."
+title: "/fsanitize-coverage (Configure sanitizer coverage)"
+ms.date: 09/15/2021
+f1_keywords: ["/fsanitize-coverage", "-fsanitize-coverage", "/fsanitize-coverage=inline-8bit-counters", "/fsanitize-coverage=edge", "/fsanitize-coverage=trace-cmp", "/fsanitize-coverage=trace-div", "/fno-sanitize-coverage=inline-8bit-counters", "/fno-sanitize-coverage=edge", "/fno-sanitize-coverage=trace-cmp", "/fno-sanitize-coverage=trace-div"]
+helpviewer_keywords: ["/fsanitize-coverage [C++]", "sanitizer compiler option [C++]", "/fsanitize-coverage=inline-8bit-counters", "/fsanitize-coverage=edge", "/fsanitize-coverage=trace-cmp", "/fsanitize-coverage=trace-div", "/fno-sanitize-coverage=inline-8bit-counters", "/fno-sanitize-coverage=edge", "/fno-sanitize-coverage=trace-cmp", "/fno-sanitize-coverage=trace-div"]
+---
+# `/fsanitize-coverage` (Configure sanitizer coverage)
+
+The **`/fsanitize-coverage`** compiler options instruct the compiler to add various kinds of instrumentation points where user-defined functions are called. These options are useful for fuzzing scenarios that use **`/fsanitize=fuzzer`**, like OneFuzz. For more information, see the [OneFuzz documentation](https://www.microsoft.com/en-us/research/project/project-onefuzz/) and [OneFuzz GitHub project](https://github.com/microsoft/onefuzz).
+
+## Syntax
+
+> **`/fsanitize-coverage=edge`**\
+> **`/fsanitize-coverage=inline-8bit-counters`**\
+> **`/fsanitize-coverage=trace-cmp`**\
+> **`/fsanitize-coverage=trace-div`**\
+> **`/fno-sanitize-coverage=edge`**\
+> **`/fno-sanitize-coverage=inline-8bit-counters`**\
+> **`/fno-sanitize-coverage=trace-cmp`**\
+> **`/fno-sanitize-coverage=trace-div`**
+
+## Remarks
+
+The experimental **`/fsanitize-coverage`** compiler options offer code coverage support and various options to modify which compiler-provided instrumentation is generated. All these options are automatically set when the [`/fsanitize=fuzzer`](fsanitize.md) option is specified. The **`/fsanitize=fuzzer`** option requires the same instrumentation points and callbacks mentioned in these options.
+
+The **`/fsanitize-coverage`** options don't allow comma-separated syntax, for example: **`/fsanitize-coverage=edge,inline-8bit-counters,trace-cmp,trace-div`**. Specify these options individually.
+
+The **`/fsanitize-coverage`** options are available beginning in Visual Studio 2022 version 17.0.
+
+### Code coverage
+
+The **`/fsanitize-coverage=edge`** compiler option enables code coverage instrumentation along all non-redundant edges. Use **`/fno-sanitize-coverage=edge`** to disable this option if it's already provided or implied by another option.
+
+### Inline counters
+
+The **`/fsanitize-coverage=inline-8bit-counters`** compiler option instructs the compiler to add an inline counter increment on every relevant edge. This option also adds a call to `extern "C" void __sanitizer_cov_8bit_counters_init(uint8_t *start, uint8_t *stop)` that you must implement. The arguments correspond to the start and end of an array that contains all the 8-bit counters created. Use **`/fno-sanitize-coverage=inline-8bit-counters`** to disable this option if it's already provided or implied by another option.
+
+### Trace comparisons
+
+The **`/fsanitize-coverage=trace-cmp`** compiler option instructs the compiler to insert calls to the following functions:
+
+```C
+// Before each comparison instruction of the stated size.
+void __sanitizer_cov_trace_cmp1(uint8_t Arg1, uint8_t Arg2);
+void __sanitizer_cov_trace_cmp2(uint16_t Arg1, uint16_t Arg2);
+void __sanitizer_cov_trace_cmp4(uint32_t Arg1, uint32_t Arg2);
+void __sanitizer_cov_trace_cmp8(uint64_t Arg1, uint64_t Arg2);
+
+// Before each comparison instruction of the stated size, if one of the operands (Arg1) is constant.
+void __sanitizer_cov_trace_const_cmp1(uint8_t Arg1, uint8_t Arg2);
+void __sanitizer_cov_trace_const_cmp2(uint16_t Arg1, uint16_t Arg2);
+void __sanitizer_cov_trace_const_cmp4(uint32_t Arg1, uint32_t Arg2);
+void __sanitizer_cov_trace_const_cmp8(uint64_t Arg1, uint64_t Arg2);
+```
+
+Use **`/fno-sanitize-coverage=trace-cmp`** to disable this option if it's already provided or implied by another option.
+
+### Trace divisions
+
+The **`/fsanitize-coverage=trace-div`** compiler option instructs the compiler to insert calls to the following functions:
+
+```C
+// Before a division instruction of the stated size.
+void __sanitizer_cov_trace_div4(uint32_t Val);
+void __sanitizer_cov_trace_div8(uint64_t Val);
+```
+
+Use **`/fno-sanitize-coverage=trace-div`** to disable this option if it's already provided or implied by another option.
+
+### To set the advanced compiler options
+
+1. Open your project's **Property Pages** dialog box.
+
+1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
+
+1. Modify the **Additional Options** property to set **/fsanitize-coverage** options.
+
+1. Choose **OK** or **Apply** to save your changes.
+
+## See also
+
+[MSVC compiler options](compiler-options.md)\
+[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\
+[`/fsanitize` (Enable Sanitizers)](fsanitize.md)\
+[AddressSanitizer build and language reference](../../sanitizers/asan-building.md)
diff --git a/docs/build/reference/fsanitize.md b/docs/build/reference/fsanitize.md
index eeb828ebfe2..e4a146577b2 100644
--- a/docs/build/reference/fsanitize.md
+++ b/docs/build/reference/fsanitize.md
@@ -1,27 +1,30 @@
---
description: "Learn more about the /fsanitize (enable sanitizers) compiler option"
title: "/fsanitize (Enable sanitizers)"
-ms.date: 02/24/2021
-f1_keywords: ["/fsanitize", "-fsanitize", "/fsanitize=address", "/fsanitize-address-use-after-return", "-fsanitize-address-use-after-return", "/fno-sanitize-address-vcasan-lib", "-fno-sanitize-address-vcasan-lib"]
+ms.date: 09/15/2021
+f1_keywords: ["/fsanitize", "-fsanitize", "/fsanitize=address", "/fsanitize=fuzzer", "/fsanitize-address-use-after-return", "-fsanitize-address-use-after-return", "/fno-sanitize-address-vcasan-lib", "-fno-sanitize-address-vcasan-lib"]
helpviewer_keywords: ["/fsanitize [C++]", "-fsanitize=address [C++]", "address sanitizer compiler option [C++]", "/fsanitize-address-use-after-return", "/fno-sanitize-address-vcasan-lib"]
---
# `/fsanitize` (Enable sanitizers)
-Use the **`/fsanitize`** compiler options to enable sanitizers. As of Visual Studio 2019 16.9, the only supported sanitizer is [AddressSanitizer](../../sanitizers/asan.md).
+Use the **`/fsanitize`** compiler options to enable sanitizers.
## Syntax
> **`/fsanitize=address`**\
+> **`/fsanitize=fuzzer`**\
> **`/fsanitize-address-use-after-return`**\
> **`/fno-sanitize-address-vcasan-lib`**
## Remarks
-The **`/fsanitize=address`** compiler option enables [AddressSanitizer](../../sanitizers/asan.md), a powerful compiler and runtime technology to light up [hard-to-find bugs](../../sanitizers/asan.md#error-types).
+The **`/fsanitize=address`** compiler option enables [AddressSanitizer](../../sanitizers/asan.md), a powerful compiler and runtime technology to uncover [hard-to-find bugs](../../sanitizers/asan.md#error-types). Support for the **`/fsanitize=address`** option is available starting in Visual Studio 2019 version 16.9.
-The **`/fsanitize-address-use-after-return`** and **`/fno-sanitize-address-vcasan-lib`** compiler options, and the [`/INFERASANLIBS` (Use inferred sanitizer libs)](./inferasanlibs.md) and **`/INFERASANLIBS:NO`** linker options offer support for advanced users. For more information, see [AddressSanitizer build and language reference](../../sanitizers/asan-building.md).
+The **`/fsanitize=fuzzer`** compiler option enables experimental support for [LibFuzzer](https://releases.llvm.org/3.8.0/docs/LibFuzzer.html). LibFuzzer is a coverage-guided fuzzing library that can be used to find bugs and crashes caused by user-provided input. We recommended you use **`/fsanitize=address`** with LibFuzzer. This option is useful for fuzzing tools such as OneFuzz. For more information, see the [OneFuzz documentation](https://www.microsoft.com/en-us/research/project/project-onefuzz/) and [OneFuzz GitHub project](https://github.com/microsoft/onefuzz). Support for the **`/fsanitize=fuzzer`** option is available starting in Visual Studio 2022 version 17.0.
+
+The **`/fsanitize`** option doesn't allow comma-separated syntax, for example: **`/fsanitize=address,fuzzer`**. These options must be specified individually.
-The **`/fsanitize`** options are available beginning in Visual Studio 2019 version 16.9.
+The **`/fsanitize-address-use-after-return`** and **`/fno-sanitize-address-vcasan-lib`** compiler options, and the [`/INFERASANLIBS` (Use inferred sanitizer libs)](./inferasanlibs.md) and **`/INFERASANLIBS:NO`** linker options offer support for advanced users. For more information, see [AddressSanitizer build and language reference](../../sanitizers/asan-building.md).
### To set the **`/fsanitize=address`** compiler option in the Visual Studio development environment
@@ -33,6 +36,16 @@ The **`/fsanitize`** options are available beginning in Visual Studio 2019 versi
1. Choose **OK** or **Apply** to save your changes.
+### To set the **`/fsanitize=fuzzer`** compiler option in the Visual Studio development environment
+
+1. Open your project's **Property Pages** dialog box.
+
+1. Select the **Configuration Properties** > **C/C++** > **General** property page.
+
+1. Modify the **Enable Fuzzer** property. To enable it, choose **Yes (/fsanitize=fuzzer)**.
+
+1. Choose **OK** or **Apply** to save your changes.
+
### To set the advanced compiler options
1. Open your project's **Property Pages** dialog box.
@@ -52,6 +65,7 @@ The **`/fsanitize`** options are available beginning in Visual Studio 2019 versi
[MSVC compiler options](compiler-options.md)\
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\
[`/INFERASANLIBS` (Use inferred sanitizer libs)](./inferasanlibs.md)\
+[`/fsanitize-coverage` (Configure sanitizer coverage)](fsanitize-coverage.md)\
[AddressSanitizer overview](../../sanitizers/asan.md)\
[AddressSanitizer known issues](../../sanitizers/asan-known-issues.md)\
[AddressSanitizer build and language reference](../../sanitizers/asan-building.md)
diff --git a/docs/build/reference/std-specify-language-standard-version.md b/docs/build/reference/std-specify-language-standard-version.md
index d305e2f28f8..9fa24310b7f 100644
--- a/docs/build/reference/std-specify-language-standard-version.md
+++ b/docs/build/reference/std-specify-language-standard-version.md
@@ -1,7 +1,7 @@
---
title: "/std (Specify Language Standard Version)"
description: "The MSVC compiler option /std specifies the C or C++ language standard supported by the compiler."
-ms.date: 06/14/2021
+ms.date: 10/22/2021
f1_keywords: ["/std", "-std", "/std:c++14", "/std:c++17", "/std:c11", "/std:c17", "VC.Project.VCCLCompilerTool.CppLanguageStandard"]
---
# `/std` (Specify Language Standard Version)
@@ -51,7 +51,7 @@ The **`/std:c++20`** option disables compiler and standard library support for f
**`/std:c++latest`**\
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.
-Depending on the MSVC compiler version or update level, C++17 or C++20 features may not be fully implemented or fully conforming when you specify the **`/std:c++latest`** 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).
+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).
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.
diff --git a/docs/build/toc.yml b/docs/build/toc.yml
index 127c19fe656..2a6e186b5e6 100644
--- a/docs/build/toc.yml
+++ b/docs/build/toc.yml
@@ -563,6 +563,8 @@ items:
href: ../build/reference/fs-force-synchronous-pdb-writes.md
- name: /fsanitize (Enable sanitizers)
href: ../build/reference/fsanitize.md
+ - name: /fsanitize-coverage (Configure sanitizer coverage)
+ href: ../build/reference/fsanitize-coverage.md
- name: /GA (Optimize for Windows application)
href: ../build/reference/ga-optimize-for-windows-application.md
- name: /Gd, /Gr, /Gv, /Gz (Calling convention)
diff --git a/docs/build/vscpp-step-0-installation.md b/docs/build/vscpp-step-0-installation.md
index ab35617c382..0fc6e1e719e 100644
--- a/docs/build/vscpp-step-0-installation.md
+++ b/docs/build/vscpp-step-0-installation.md
@@ -188,5 +188,3 @@ When Visual Studio is running, you're ready to continue to the next step.
> [!div class="nextstepaction"]
> [Create a C++ project](vscpp-step-1-create.md)
-
-
diff --git a/docs/build/vscpp-step-1-create.md b/docs/build/vscpp-step-1-create.md
index d17f19febb9..d0744e447be 100644
--- a/docs/build/vscpp-step-1-create.md
+++ b/docs/build/vscpp-step-1-create.md
@@ -162,5 +162,3 @@ If red squiggles appear under anything in the source code editor, check that you
[Go back](#add-code-to-the-source-file).
::: moniker-end
-
-
diff --git a/docs/build/vscpp-step-2-build.md b/docs/build/vscpp-step-2-build.md
index aed45c8a7d9..f77e62bf303 100644
--- a/docs/build/vscpp-step-2-build.md
+++ b/docs/build/vscpp-step-2-build.md
@@ -78,5 +78,3 @@ You can also navigate to the solution Debug folder at the command line to run yo
If you don't see **Copy as path** in the shortcut menu, dismiss the menu, and then hold down the **Shift** key while you open it again. This command is just for convenience. You can also copy the path to the folder from the File Explorer search bar, and paste it into the **Run** dialog, and then enter the name of your executable at the end. It's just a little more typing, but it has the same result.
[Go back.](#run-your-code-in-a-command-window)
-
-
diff --git a/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md b/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md
index 47833032559..cdfa078819b 100644
--- a/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md
+++ b/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md
@@ -52,7 +52,7 @@ You need these prerequisites to complete this walkthrough:
## Create the C++ source files
-In this walkthrough, you'll create a project that has a source file and a header file. The source file *`main.cpp`* contains the `main` function for the console application. The header file *`main.h`* contains code to include the *``* header file. You can create these C++ files by using Visual Studio or a text editor such as Visual Studio Code.
+In this walkthrough, you'll create a project that has a source file and a header file. The source file *`main.cpp`* contains the `main` function for the console application. The header file *`main.h`* contains code to include the `` header file. You can create these C++ files by using Visual Studio or a text editor such as Visual Studio Code.
### To create the C++ source files for your project
diff --git a/docs/code-quality/c26478.md b/docs/code-quality/c26478.md
index d11c818b390..68a0e6d53d3 100644
--- a/docs/code-quality/c26478.md
+++ b/docs/code-quality/c26478.md
@@ -2,8 +2,6 @@
description: "Learn more about: Warning C26478: Don't use std::move on constant variables. (es.56)"
title: c26478
keywords: c26478
-author: JordanMaples
-ms.author: jomaples
ms.date: 07/15/2019
ms.topic: reference
f1_keywords: ["C26478"]
diff --git a/docs/code-quality/c26812.md b/docs/code-quality/c26812.md
index 985e3542a50..d1110bad765 100644
--- a/docs/code-quality/c26812.md
+++ b/docs/code-quality/c26812.md
@@ -2,8 +2,6 @@
description: "Learn more about: C26812"
title: c26812
keywords: c26812
-author: JordanMaples
-ms.author: jomaples
ms.date: 07/15/2019
ms.topic: reference
f1_keywords: ["C26812"]
diff --git a/docs/code-quality/c26814.md b/docs/code-quality/c26814.md
index f6e9906ea99..eeb77e1c86c 100644
--- a/docs/code-quality/c26814.md
+++ b/docs/code-quality/c26814.md
@@ -2,8 +2,6 @@
description: "Learn more about: C26814"
title: c26814
keywords: c26814
-author: JordanMaples
-ms.author: jomaples
ms.date: 07/15/2019
ms.topic: reference
f1_keywords: ["C26814"]
diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1047.md b/docs/error-messages/compiler-errors-1/fatal-error-c1047.md
index 5480c552e2c..c868dfe4150 100644
--- a/docs/error-messages/compiler-errors-1/fatal-error-c1047.md
+++ b/docs/error-messages/compiler-errors-1/fatal-error-c1047.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: Fatal Error C1047"
title: "Fatal Error C1047"
-ms.date: 02/17/2021
+ms.date: 10/22/2021
f1_keywords: ["C1047"]
helpviewer_keywords: ["C1047"]
---
@@ -21,4 +21,4 @@ To resolve C1047, rebuild all object files or libraries by using the same versio
[`/GL` (Whole Program Optimization)](../../build/reference/gl-whole-program-optimization.md)\
[`/LTCG` (Link-time code generation)](../../build/reference/ltcg-link-time-code-generation.md)\
-[C++ binary compatibility 2015-2019](../../porting/binary-compat-2015-2017.md)
+[C++ binary compatibility between Visual Studio versions](../../porting/binary-compat-2015-2017.md)
diff --git a/docs/error-messages/tool-errors/linker-tools-error-lnk2001.md b/docs/error-messages/tool-errors/linker-tools-error-lnk2001.md
index 9679863c906..4b3626bc8fe 100644
--- a/docs/error-messages/tool-errors/linker-tools-error-lnk2001.md
+++ b/docs/error-messages/tool-errors/linker-tools-error-lnk2001.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: Linker Tools Error LNK2001"
title: "Linker Tools Error LNK2001"
-ms.date: "12/19/2019"
+ms.date: 10/22/2021
f1_keywords: ["LNK2001"]
helpviewer_keywords: ["LNK2001"]
ms.assetid: dc1cf267-c984-486c-abd2-fd07c799f7ef
@@ -36,7 +36,7 @@ This error can occur:
- If you link to the release mode libraries when building a debug version of an application. Similarly, if you use options **/MTd** or **/MDd** or define `_DEBUG` and then link to the release libraries, you should expect many potential unresolved externals, among other problems. Linking a release mode build with the debug libraries also causes similar problems. To fix this issue, make sure you use the debug libraries in your debug builds, and retail libraries in your retail builds.
-- If your code refers to a symbol from one library version, but you link a different version of the library. Generally, you can't mix object files or libraries that are built for different versions of the compiler. The libraries that ship in one version may contain symbols that can't be found in the libraries included with other versions. To fix this issue, build all the object files and libraries with the same version of the compiler before linking them together. For more information, see [C++ binary compatibility 2015-2019](../../porting/binary-compat-2015-2017.md).
+- If your code refers to a symbol from one library version, but you link a different version of the library. Generally, you can't mix object files or libraries that are built for different versions of the compiler. The libraries that ship in one version may contain symbols that can't be found in the libraries included with other versions. To fix this issue, build all the object files and libraries with the same version of the compiler before linking them together. For more information, see [C++ binary compatibility between Visual Studio versions](../../porting/binary-compat-2015-2017.md).
- If library paths are out of date. The **Tools > Options > Projects > VC++ Directories** dialog, under the **Library files** selection, allows you to change the library search order. The Linker folder in the project's Property Pages dialog box may also contain paths that could be out of date.
diff --git a/docs/overview/cpp-conformance-improvements-2017.md b/docs/overview/cpp-conformance-improvements-2017.md
index 31eef0387cd..888a71e8253 100644
--- a/docs/overview/cpp-conformance-improvements-2017.md
+++ b/docs/overview/cpp-conformance-improvements-2017.md
@@ -8,7 +8,7 @@ ms.technology: "cpp-language"
Microsoft C/C++ in Visual Studio (MSVC) makes conformance improvements and bug fixes in every release. This article lists the improvements by major release, then by version. To jump directly to the changes for a specific version, use list below **In this article**.
-This document lists the changes in Visual Studio 2017. For a guide to the changes in Visual Studio 2019, see [C++ conformance improvements in Visual Studio 2019](cpp-conformance-improvements.md). For a complete list of previous conformance improvements, see [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md).
+This document lists the changes in Visual Studio 2017. For a guide to the changes in Visual Studio 2022, see [C++ conformance improvements in Visual Studio 2022](cpp-conformance-improvements.md). For a guide to the changes in Visual Studio 2019, see [C++ conformance improvements in Visual Studio 2019](cpp-conformance-improvements-2019.md). For a complete list of previous conformance improvements, see [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md).
## Conformance improvements in Visual Studio 2017 RTW (version 15.0)
diff --git a/docs/overview/cpp-conformance-improvements-2019.md b/docs/overview/cpp-conformance-improvements-2019.md
new file mode 100644
index 00000000000..8b3be8d805b
--- /dev/null
+++ b/docs/overview/cpp-conformance-improvements-2019.md
@@ -0,0 +1,2525 @@
+---
+title: "C++ conformance improvements in Visual Studio 2019"
+description: "Microsoft C++ in Visual Studio is progressing toward full conformance with the C++20 language standard."
+ms.date: 10/23/2021
+ms.technology: "cpp-language"
+---
+# C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2019
+
+Microsoft C/C++ in Visual Studio (MSVC) makes conformance improvements and bug fixes in every release. This article lists the improvements by major release, then by version. To jump directly to the changes for a specific version, use the list below **In this article**.
+
+This document lists the changes in Visual Studio 2019. For a guide to the changes in Visual Studio 2022, see [C++ conformance improvements in Visual Studio 2022](cpp-conformance-improvements.md). For changes in Visual Studio 2017, see [C++ conformance improvements in Visual Studio 2017](cpp-conformance-improvements-2017.md). For a complete list of previous conformance improvements, see [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md).
+
+## Conformance improvements in Visual Studio 2019 RTW (version 16.0)
+
+Visual Studio 2019 RTW contains the following conformance improvements, bug fixes, and behavior changes in the Microsoft C++ compiler.
+
+> [!NOTE]
+> C++20 features were available only in [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) mode in Visual Studio 2019 until the C++20 implementation was considered complete. Visual Studio 2019 version 16.11 introduces the [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) compiler mode. In this article, features that originally required **`/std:c++latest`** mode now work in **`/std:c++20`** mode or later in the latest versions of Visual Studio. We've updated the documentation to mention **`/std:c++20`**, even though this option wasn't available when the features were first released.
+
+### Improved modules support for templates and error detection
+
+Modules are now officially in the C++20 standard. Improved support was added in Visual Studio 2017 version 15.9. For more information, see [Better template support and error detection in C++ Modules with MSVC 2017 version 15.9](https://devblogs.microsoft.com/cppblog/better-template-support-and-error-detection-in-c-modules-with-msvc-2017-version-15-9/).
+
+### Modified specification of aggregate type
+
+The specification of an aggregate type has changed in C++20 (see [Prohibit aggregates with user-declared constructors](https://wg21.link/p1008r1)). In Visual Studio 2019, under **`/std:c++latest`** (or **`/std:c++20`** starting in Visual Studio 2019 version 16.11), a class with any user-declared constructor (for example, including a constructor declared `= default` or `= delete`) isn't an aggregate. Previously, only user-provided constructors would disqualify a class from being an aggregate. This change puts more restrictions on how such types can be initialized.
+
+The following code compiles without errors in Visual Studio 2017 but raises errors C2280 and C2440 in Visual Studio 2019 under **`/std:c++20`** or **`/std:c++latest`**:
+
+```cpp
+struct A
+{
+ A() = delete; // user-declared ctor
+};
+
+struct B
+{
+ B() = default; // user-declared ctor
+ int i = 0;
+};
+
+A a{}; // ill-formed in C++20, previously well-formed
+B b = { 1 }; // ill-formed in C++20, previously well-formed
+```
+
+### Partial support for `operator <=>`
+
+[P0515R3](https://wg21.link/p0515r3) C++20 introduces the `<=>` three-way comparison operator, also known as the "spaceship operator". Visual Studio 2019 version 16.0 in **`/std:c++latest`** mode introduces partial support for the operator by raising errors for syntax that's now disallowed. For example, the following code compiles without errors in Visual Studio 2017 but raises multiple errors in Visual Studio 2019 under **`/std:c++20`** or **`/std:c++latest`**:
+
+```cpp
+struct S
+{
+ bool operator<=(const S&) const { return true; }
+};
+
+template
+struct U { };
+
+int main(int argc, char** argv)
+{
+ U<&S::operator<=> u; // In Visual Studio 2019 raises C2039, 2065, 2146.
+}
+```
+
+To avoid the errors, insert a space in the offending line before the final angle bracket: `U<&S::operator<= > u;`.
+
+### References to types with mismatched cv-qualifiers
+
+Previously, MSVC allowed direct binding of a reference from a type with mismatched cv-qualifiers below the top level. This binding could allow modification of supposedly const data referred to by the reference. The compiler now creates a temporary, as required by the standard. In Visual Studio 2017, the following code compiles without warnings. In Visual Studio 2019, the compiler raises warning C4172:
+
+```cpp
+struct X
+{
+ const void* const& PData() const
+ {
+ return _pv;
+ }
+
+ void* _pv;
+};
+
+int main()
+{
+ X x;
+ auto p = x.PData(); // C4172 returning address of local variable or temporary
+}
+```
+
+### `reinterpret_cast` from an overloaded function
+
+The argument to **`reinterpret_cast`** isn't one of the contexts in which the address of an overloaded function is permitted. The following code compiles without errors in Visual Studio 2017, but in Visual Studio 2019 it raises error C2440:
+
+```cpp
+int f(int) { return 1; }
+int f(float) { return .1f; }
+using fp = int(*)(int);
+
+int main()
+{
+ fp r = reinterpret_cast(&f); // C2440: cannot convert from 'overloaded-function' to 'fp'
+}
+```
+
+To avoid the error, use an allowed cast for this scenario:
+
+```cpp
+int f(int);
+int f(float);
+using fp = int(*)(int);
+
+int main()
+{
+ fp r = static_cast(&f); // or just &f;
+}
+```
+
+### Lambda closures
+
+In C++14, lambda closure types aren't literals. The primary consequence of this rule is that a lambda may not be assigned to a **`constexpr`** variable. The following code compiles without errors in Visual Studio 2017, but in Visual Studio 2019 it raises error C2127:
+
+```cpp
+int main()
+{
+ constexpr auto l = [] {}; // C2127 'l': illegal initialization of 'constexpr' entity with a non-constant expression
+}
+```
+
+To avoid the error, either remove the **`constexpr`** qualifier, or else change the conformance mode to **`/std:c++17`** or later.
+
+### `std::create_directory` failure codes
+
+Implemented [P1164](https://wg21.link/p1164r1) from C++20 unconditionally. This changes `std::create_directory` to check whether the target was already a directory on failure. Previously, all ERROR_ALREADY_EXISTS type errors were turned into success-but-directory-not-created codes.
+
+### `operator<<(std::ostream, nullptr_t)`
+
+Per [LWG 2221](https://cplusplus.github.io/LWG/issue2221), added `operator<<(std::ostream, nullptr_t)` for writing **`nullptr`** to streams.
+
+### More parallel algorithms
+
+New parallel versions of `is_sorted`, `is_sorted_until`, `is_partitioned`, `set_difference`, `set_intersection`, `is_heap`, and `is_heap_until`.
+
+### Fixes in atomic initialization
+
+[P0883 "Fixing atomic initialization"](https://wg21.link/p0883r1) changes `std::atomic` to value-initialize the contained `T` rather than default-initializing it. The fix is enabled when using Clang/LLVM with the Microsoft standard library. It's currently disabled for the Microsoft C++ compiler, as a workaround for a bug in **`constexpr`** processing.
+
+### `remove_cvref` and `remove_cvref_t`
+
+Implemented the `remove_cvref` and `remove_cvref_t` type traits from [P0550](https://wg21.link/p0550r2). These remove reference-ness and cv-qualification from a type without decaying functions and arrays to pointers (unlike `std::decay` and `std::decay_t`).
+
+### Feature-test macros
+
+[P0941R2 - feature-test macros](https://wg21.link/p0941r2) is complete, with support for `__has_cpp_attribute`. Feature-test macros are supported in all standard modes.
+
+### Prohibit aggregates with user-declared constructors
+
+C++20 [P1008R1 - prohibiting aggregates with user-declared constructors](https://wg21.link/p1008r1) is complete.
+
+### `reinterpret_cast` in a `constexpr` function
+
+A **`reinterpret_cast`** is illegal in a **`constexpr`** function. The Microsoft C++ compiler would previously reject **`reinterpret_cast`** only if it were used in a **`constexpr`** context. In Visual Studio 2019, in all language standards modes, the compiler correctly diagnoses a **`reinterpret_cast`** in the definition of a **`constexpr`** function. The following code now produces C3615:
+
+```cpp
+long long i = 0;
+constexpr void f() {
+ int* a = reinterpret_cast(i); // C3615: constexpr function 'f' cannot result in a constant expression
+}
+```
+
+To avoid the error, remove the **`constexpr`** modifier from the function declaration.
+
+### Correct diagnostics for basic_string range constructor
+
+In Visual Studio 2019, the `basic_string` range constructor no longer suppresses compiler diagnostics with **`static_cast`**. The following code compiles without warnings in Visual Studio 2017, despite the possible loss of data from **`wchar_t`** to **`char`** when initializing `out`:
+
+```cpp
+std::wstring ws = /* . . . */;
+std::string out(ws.begin(), ws.end()); // VS2019 C4244: 'argument': conversion from 'wchar_t' to 'const _Elem', possible loss of data.
+```
+
+Visual Studio 2019 correctly raises warning C4244. To avoid the warning, you can initialize the `std::string` as shown in this example:
+
+```cpp
+std::wstring ws = L"Hello world";
+std::string out;
+for (wchar_t ch : ws)
+{
+ out.push_back(static_cast(ch));
+}
+```
+
+### Incorrect calls to `+=` and `-=` under `/clr` or `/ZW` are now correctly detected
+
+A bug was introduced in Visual Studio 2017 that caused the compiler to silently ignore errors and generate no code for the invalid calls to **`+=`** and **`-=`** under **`/clr`** or **`/ZW`**. The following code compiles without errors in Visual Studio 2017 but in Visual Studio 2019 it correctly raises error C2845:
+
+```cpp
+public enum class E { e };
+
+void f(System::String ^s)
+{
+ s += E::e; // in VS2019 C2845: 'System::String ^': pointer arithmetic not allowed on this type.
+}
+```
+
+To avoid the error in this example, use the **`+=`** operator with the `ToString()` method: `s += E::e.ToString();`.
+
+### Initializers for inline static data members
+
+Invalid member accesses within **`inline`** and **`static constexpr`** initializers are now correctly detected. The following example compiles without error in Visual Studio 2017, but in Visual Studio 2019 under **`/std:c++17`** mode or later it raises error C2248:
+
+```cpp
+struct X
+{
+ private:
+ static inline const int c = 1000;
+};
+
+struct Y : X
+{
+ static inline int d = c; // VS2019 C2248: cannot access private member declared in class 'X'.
+};
+```
+
+To avoid the error, declare the member `X::c` as protected:
+
+```cpp
+struct X
+{
+ protected:
+ static inline const int c = 1000;
+};
+```
+
+### C4800 reinstated
+
+MSVC used to have a performance warning C4800 about implicit conversion to **`bool`**. It was too noisy and couldn't be suppressed, leading us to remove it in Visual Studio 2017. However, over the lifecycle of Visual Studio 2017 we got lots of feedback on the useful cases it was solving. We bring back in Visual Studio 2019 a carefully tailored C4800, along with the explanatory C4165. Both of these warnings are easy to suppress: either by using an explicit cast, or by comparison to 0 of the appropriate type. C4800 is an [off-by-default](../preprocessor/compiler-warnings-that-are-off-by-default.md) level 4 warning, and C4165 is an off-by-default level 3 warning. Both are discoverable by using the **`/Wall`** compiler option.
+
+The following example raises C4800 and C4165 under **`/Wall`**:
+
+```cpp
+bool test(IUnknown* p)
+{
+ bool valid = p; // warning C4800: Implicit conversion from 'IUnknown*' to bool. Possible information loss
+ IDispatch* d = nullptr;
+ HRESULT hr = p->QueryInterface(__uuidof(IDispatch), reinterpret_cast(&d));
+ return hr; // warning C4165: 'HRESULT' is being converted to 'bool'; are you sure this is what you want?
+}
+```
+
+To avoid the warnings in the previous example, you can write the code like this:
+
+```cpp
+bool test(IUnknown* p)
+{
+ bool valid = p != nullptr; // OK
+ IDispatch* d = nullptr;
+ HRESULT hr = p->QueryInterface(__uuidof(IDispatch), reinterpret_cast(&d));
+ return SUCCEEDED(hr); // OK
+}
+```
+
+### Local class member function doesn't have a body
+
+In Visual Studio 2017, warning C4822 is raised only when compiler option **`/w14822`** is explicitly set. It isn't shown with **`/Wall`**. In Visual Studio 2019, C4822 is an [off-by-default](../preprocessor/compiler-warnings-that-are-off-by-default.md) warning, which makes it discoverable under **`/Wall`** without having to set **`/w14822`** explicitly.
+
+```cpp
+void example()
+{
+ struct A
+ {
+ int boo(); // warning C4822: Local class member function doesn't have a body
+ };
+}
+```
+
+### Function template bodies containing `if constexpr` statements
+
+In Visual Studio 2019 under **`/std:c++20`** or **`/std:c++latest`**, template function bodies that have **`if constexpr`** statements have extra parsing-related checks enabled. For example, in Visual Studio 2017 the following code produces [C7510](../error-messages/compiler-errors-2/compiler-error-c7510.md) only if the **`/permissive-`** option is set. In Visual Studio 2019 the same code raises errors even when the **`/permissive`** option is set:
+
+```cpp
+// C7510.cpp
+// compile using: cl /EHsc /W4 /permissive /std:c++latest C7510.cpp
+#include
+
+template
+int f()
+{
+ T::Type a; // error C7510: 'Type': use of dependent type name must be prefixed with 'typename'
+ // To fix the error, add the 'typename' keyword. Use this declaration instead:
+ // typename T::Type a;
+
+ if constexpr (a.val)
+ {
+ return 1;
+ }
+ else
+ {
+ return 2;
+ }
+}
+
+struct X
+{
+ using Type = X;
+ constexpr static int val = 1;
+};
+
+int main()
+{
+ std::cout << f() << "\n";
+}
+```
+
+To avoid the error, add the **`typename`** keyword to the declaration of `a`: `typename T::Type a;`.
+
+### Inline assembly code isn't supported in a lambda expression
+
+The Microsoft C++ team was recently made aware of a security issue in which the use of inline-assembler within a lambda could lead to the corruption of `ebp` (the return address register) at runtime. A malicious attacker could possibly take advantage of this scenario. The inline assembler is only supported on x86, and interaction between the inline assembler and the rest of the compiler is poor. Given these facts and the nature of the issue, the safest solution to this problem was to disallow inline assembler within a lambda expression.
+
+The only use of inline assembler within a lambda expression that we have found 'in the wild' was to capture the return address. In this scenario, you can capture the return address on all platforms simply by using a compiler intrinsic `_ReturnAddress()`.
+
+The following code produces C7552 in both Visual Studio 2017 15.9 and in Visual Studio 2019:
+
+```cpp
+#include
+
+int f()
+{
+ int y = 1724;
+ int x = 0xdeadbeef;
+
+ auto lambda = [&]
+ {
+ __asm { // C7552: inline assembler is not supported in a lambda
+
+ mov eax, x
+ mov y, eax
+ }
+ };
+
+ lambda();
+ return y;
+}
+```
+
+To avoid the error, move the assembly code into a named function as shown in the following example:
+
+```cpp
+#include
+
+void g(int& x, int& y)
+{
+ __asm {
+ mov eax, x
+ mov y, eax
+ }
+}
+
+int f()
+{
+ int y = 1724;
+ int x = 0xdeadbeef;
+ auto lambda = [&]
+ {
+ g(x, y);
+ };
+ lambda();
+ return y;
+}
+
+int main()
+{
+ std::printf("%d\n", f());
+}
+```
+
+### Iterator debugging and `std::move_iterator`
+
+The iterator debugging feature has been taught to properly unwrap `std::move_iterator`. For example, `std::copy(std::move_iterator::iterator>, std::move_iterator::iterator>, int*)` can now engage the `memcpy` fast path.
+
+### Fixes for \ keyword enforcement
+
+The standard library's enforcement in \ for macros replacing a keyword was fixed. The library now emits the actual problem keyword detected rather than a generic message. It also supports C++20 keywords, and avoids tricking IntelliSense into saying random keywords are macros.
+
+### Allocator types no longer deprecated
+
+`std::allocator`, `std::allocator::size_type`, and `std::allocator::difference_type` are no longer deprecated.
+
+### Correct warning for narrowing string conversions
+
+Removed a spurious **`static_cast`** from `std::string` that wasn't called for by the standard, and that accidentally suppressed C4244 narrowing warnings. Attempts to call `std::string::string(const wchar_t*, const wchar_t*)` now properly emit C4244 about narrowing a `wchar_t` into a `char`.
+
+### Various fixes for \ correctness
+
+- Fixed `std::filesystem::last_write_time` failing when attempting to change a directory's last write time.
+- The `std::filesystem::directory_entry` constructor now stores a failed result, rather than throwing an exception, when supplied a nonexistent target path.
+- The `std::filesystem::create_directory` 2-parameter version was changed to call the 1-parameter version, as the underlying `CreateDirectoryExW` function would use `copy_symlink` when the `existing_p` was a symlink.
+- `std::filesystem::directory_iterator` no longer fails when a broken symlink is found.
+- `std::filesystem::space` now accepts relative paths.
+- `std::filesystem::path::lexically_relative` is no longer confused by trailing slashes, reported as [LWG 3096](https://cplusplus.github.io/LWG/issue3096).
+- Worked around `CreateSymbolicLinkW` rejecting paths with forward slashes in `std::filesystem::create_symlink`.
+- Worked around the POSIX deletion mode `delete` function that existed in Windows 10 LTSB 1609, but couldn't actually delete files.
+- The `std::boyer_moore_searcher` and `std::boyer_moore_horspool_searcher` copy constructors and copy assignment operators now actually copy things.
+
+### Parallel algorithms on Windows 8 and later
+
+The parallel algorithms library now properly uses the real `WaitOnAddress` family on Windows 8 and later, rather than always using the Windows 7 and earlier fake versions.
+
+### `std::system_category::message()` whitespace
+
+`std::system_category::message()` now trims trailing whitespace from the returned message.
+
+### `std::linear_congruential_engine` divide by zero
+
+Some conditions that would cause `std::linear_congruential_engine` to trigger divide by 0 have been fixed.
+
+### Fixes for iterator unwrapping
+
+Some iterator-unwrapping machinery was first exposed for programmer-user integration in Visual Studio 2017 15.8. It was described in C++ Team Blog article [STL Features and Fixes in VS 2017 15.8](https://devblogs.microsoft.com/cppblog/stl-features-and-fixes-in-vs-2017-15-8/). This machinery no longer unwraps iterators derived from standard library iterators. For example, a user that derives from `std::vector::iterator` and tries to customize behavior now gets their customized behavior when calling standard library algorithms, rather than the behavior of a pointer.
+
+The unordered container `reserve` function now actually reserves for N elements, as described in [LWG 2156](https://cplusplus.github.io/LWG/issue2156).
+
+### Time handling
+
+- Previously, some time values that were passed to the concurrency library would overflow, for example, `condition_variable::wait_for(seconds::max())`. Now fixed, the overflows changed behavior on a seemingly random 29-day cycle (when uint32_t milliseconds accepted by underlying Win32 APIs overflowed).
+
+- The \ header now correctly declares `timespec` and `timespec_get` in namespace `std`, and also declares them in the global namespace.
+
+### Various fixes for containers
+
+- Many standard library internal container functions have been made `private` for an improved IntelliSense experience. More fixes to mark members as `private` are expected in later releases of MSVC.
+
+- We fixed exception safety correctness problems that caused node-based containers, such as `list`, `map`, and `unordered_map`, to become corrupted. During a `propagate_on_container_copy_assignment` or `propagate_on_container_move_assignment` reassignment operation, we would free the container's sentinel node with the old allocator, do the POCCA/POCMA assignment over the old allocator, and then try to acquire the sentinel node from the new allocator. If this allocation failed, the container was corrupted. It couldn't even be destroyed, as owning a sentinel node is a hard data structure invariant. This code was fixed to create the new sentinel node by using the source container's allocator before destroying the existing sentinel node.
+
+- The containers were fixed to always copy/move/swap allocators according to `propagate_on_container_copy_assignment`, `propagate_on_container_move_assignment`, and `propagate_on_container_swap`, even for allocators declared `is_always_equal`.
+
+- Added the overloads for container merge and extract member functions that accept rvalue containers. For more information, see [P0083 "Splicing Maps And Sets"](https://wg21.link/p0083r3)
+
+### `std::basic_istream::read` processing of `\r\n`` =>`\n`
+
+`std::basic_istream::read` was fixed to not write into parts of the supplied buffer temporarily as part of `\r\n` to `\n` processing. This change gives up some of the performance advantage that was gained in Visual Studio 2017 15.8 for reads larger than 4K in size. However, efficiency improvements from avoiding three virtual calls per character are still present.
+
+### `std::bitset` constructor
+
+The `std::bitset` constructor no longer reads the ones and zeroes in reverse order for large bitsets.
+
+### `std::pair::operator=` regression
+
+Fixed a regression in the `std::pair` assignment operator introduced when implementing [LWG 2729 "Missing SFINAE on `std::pair::operator=`";](https://cplusplus.github.io/LWG/issue2729). It now correctly accepts types convertible to `std::pair` again.
+
+### Non-deduced contexts for `add_const_t`
+
+Fixed a minor type traits bug, where `add_const_t` and related functions are supposed to be a non-deduced context. In other words, `add_const_t` should be an alias for `typename add_const::type`, not `const T`.
+
+## Conformance improvements in 16.1
+
+### char8_t
+
+[P0482r6](https://wg21.link/p0482r6). C++20 adds a new character type that is used to represent UTF-8 code units. `u8` string literals in C++20 have type `const char8_t[N]` instead of `const char[N]`, which was the case previously. Similar changes have been proposed for the C standard in [N2231](https://wg14.link/n2231). Suggestions for **`char8_t`** backward compatibility remediation are given in [P1423r3](https://wg21.link/p1423r3). The Microsoft C++ compiler adds support for **`char8_t`** in Visual Studio 2019 version 16.1 when you specify the [`/Zc:char8_t`](../build/reference/zc-char8-t.md) compiler option. It can be reverted to C++17 behavior via **`/Zc:char8_t-`**. The EDG compiler that powers IntelliSense doesn't yet support it in Visual Studio 2019 version 16.1. You may see spurious IntelliSense-only errors that don't affect the actual compilation.
+
+#### Example
+
+```cpp
+const char* s = u8"Hello"; // C++17
+const char8_t* s = u8"Hello"; // C++20
+```
+
+### `std::type_identity` metafunction and `std::identity` function object
+
+[P0887R1 type_identity](https://wg21.link/p0887r1). The deprecated `std::identity` class template extension has been removed, and replaced with the C++20 `std::type_identity` metafunction and `std::identity` function object. Both are available only under **`/std:c++latest`** (**`/std:c++20`** starting in Visual Studio 2019 version 16.11).
+
+The following example produces deprecation warning C4996 for `std::identity` (defined in \) in Visual Studio 2017:
+
+```cpp
+#include
+
+using T = std::identity::type;
+T x, y = std::identity{}(x);
+int i = 42;
+long j = std::identity{}(i);
+```
+
+The following example shows how to use the new `std::identity` (defined in \) together with the new `std::type_identity`:
+
+```cpp
+#include
+#include
+
+using T = std::type_identity::type;
+T x, y = std::identity{}(x);
+int i = 42;
+long j = static_cast(i);
+```
+
+### Syntax checks for generic lambdas
+
+The new lambda processor enables some conformance-mode syntactic checks in generic lambdas, under **`/std:c++latest`** (**`/std:c++20`** starting in Visual Studio 2019 version 16.11) or under any other language mode with [`/Zc:lambda`](../build/reference/zc-lambda.md) in Visual Studio 2019 version 16.9 or later (previously available as **`/experimental:newLambdaProcessor`** beginning in Visual Studio 2019 version 16.3).
+
+The legacy lambda processor compiles this example without warnings, but the new lambda processor produces error C2760:
+
+```cpp
+void f() {
+ auto a = [](auto arg) {
+ decltype(arg)::Type t; // C2760 syntax error: unexpected token 'identifier', expected ';'
+ };
+}
+```
+
+This example shows the correct syntax, now enforced by the compiler:
+
+```cpp
+void f() {
+ auto a = [](auto arg) {
+ typename decltype(arg)::Type t;
+ };
+}
+```
+
+### Argument-dependent lookup for function calls
+
+[P0846R0](https://wg21.link/p0846r0) (C++20) Increased ability to find function templates via argument-dependent lookup for function-call expressions with explicit template arguments. Requires **`/std:c++latest`** (or **`/std:c++20`** starting in Visual Studio 2019 version 16.11).
+
+### Designated initialization
+
+[P0329R4](https://wg21.link/p0329r4) (C++20) *Designated initialization* allows specific members to be selected in aggregate initialization by using the `Type t { .member = expr }` syntax. Requires **`/std:c++latest`** (or **`/std:c++20`** starting in Visual Studio 2019 version 16.11).
+
+### Ranking of enum conversion to its fixed underlying type
+
+The compiler now ranks enum conversions according to [N4800](https://wg21.link/n4800) 11.3.3.2 Ranking implicit conversion sequences (4.2):
+
+- A conversion that promotes an enumeration whose underlying type is fixed to its underlying type is better than one that promotes to the promoted underlying type, if the two are different.
+
+This conversion ranking wasn't implemented correctly before Visual Studio 2019 version 16.1. The conforming behavior may change overload resolution behavior or expose an ambiguity where one previously wasn't detected.
+
+This compiler behavior change applies to all **`/std`** modes and is both a source and binary breaking change.
+
+The following example demonstrates how compiler behavior changes in 16.1 and later versions:
+
+```cpp
+#include
+
+enum E : unsigned char { e };
+
+int f(unsigned int)
+{
+ return 1;
+}
+
+int f(unsigned char)
+{
+ return 2;
+}
+
+struct A {};
+struct B : public A {};
+
+int f(unsigned int, const B&)
+{
+ return 3;
+}
+
+int f(unsigned char, const A&)
+{
+ return 4;
+}
+
+int main()
+{
+ // Calls f(unsigned char) in 16.1 and later. Called f(unsigned int) in earlier versions.
+ // The conversion from 'E' to the fixed underlying type 'unsigned char' is better than the
+ // conversion from 'E' to the promoted type 'unsigned int'.
+ f(e);
+
+ // Error C2666. This call is ambiguous, but previously called f(unsigned int, const B&).
+ f(e, B{});
+}
+```
+
+### New and updated standard library functions (C++20)
+
+- `starts_with()` and `ends_with()` for `basic_string` and `basic_string_view`.
+- `contains()` for associative containers.
+- `remove()`, `remove_if()`, and `unique()` for `list` and `forward_list` now return `size_type`.
+- `shift_left()` and `shift_right()` added to \.
+
+## Conformance improvements in 16.2
+
+### `noexcept` `constexpr` functions
+
+**`constexpr`** functions are no longer considered **`noexcept`** by default when used in a constant expression. This behavior change comes from the resolution of Core Working Group (CWG) [1351](https://wg21.link/cwg1351) and is enabled in [`/permissive-`](../build/reference/permissive-standards-conformance.md). The following example compiles in Visual Studio 2019 version 16.1 and earlier, but produces C2338 in Visual Studio 2019 version 16.2:
+
+```cpp
+constexpr int f() { return 0; }
+
+int main() {
+ static_assert(noexcept(f()), "f should be noexcept"); // C2338 in 16.2
+}
+```
+
+To fix the error, add the **`noexcept`** expression to the function declaration:
+
+```cpp
+constexpr int f() noexcept { return 0; }
+
+int main() {
+ static_assert(noexcept(f()), "f should be noexcept");
+}
+```
+
+### Binary expressions with different enum types
+
+C++20 has deprecated the usual arithmetic conversions on operands, where:
+
+- One operand is of enumeration type, and
+
+- the other is of a different enumeration type or a floating-point type.
+
+For more information, see [P1120R0](https://wg21.link/p1120r0).
+
+In Visual Studio 2019 version 16.2 and later, the following code produces a level 4 warning when the **`/std:c++latest`** compiler option is enabled (**`/std:c++20`** starting in Visual Studio 2019 version 16.11):
+
+```cpp
+enum E1 { a };
+enum E2 { b };
+int main() {
+ int i = a | b; // warning C5054: operator '|': deprecated between enumerations of different types
+}
+```
+
+To avoid the warning, use [`static_cast`](../cpp/static-cast-operator.md) to convert the second operand:
+
+```cpp
+enum E1 { a };
+enum E2 { b };
+int main() {
+ int i = a | static_cast(b);
+}
+```
+
+Using a binary operation between an enumeration and a floating-point type is now a warning when the **`/std:c++latest`** compiler option is enabled (**`/std:c++20`** starting in Visual Studio 2019 version 16.11):
+
+```cpp
+enum E1 { a };
+int main() {
+ double i = a * 1.1;
+}
+```
+
+To avoid the warning, use [`static_cast`](../cpp/static-cast-operator.md) to convert the second operand:
+
+```cpp
+enum E1 { a };
+int main() {
+ double i = static_cast(a) * 1.1;
+}
+```
+
+### Equality and relational comparisons of arrays
+
+Equality and relational comparisons between two operands of array type are deprecated in C++20 ([P1120R0](https://wg21.link/p1120r0)). In other words, a comparison operation between two arrays (despite rank and extent similarities) is now a warning. Starting in Visual Studio 2019 version 16.2, the following code produces C5056 when the **`/std:c++latest`** compiler option is enabled (**`/std:c++20`** starting in Visual Studio 2019 version 16.11):
+
+```cpp
+int main() {
+ int a[] = { 1, 2, 3 };
+ int b[] = { 1, 2, 3 };
+ if (a == b) { return 1; } // warning C5056: operator '==': deprecated for array types
+}
+```
+
+To avoid the warning, you can compare the addresses of the first elements:
+
+```cpp
+int main() {
+ int a[] = { 1, 2, 3 };
+ int b[] = { 1, 2, 3 };
+ if (&a[0] == &b[0]) { return 1; }
+}
+```
+
+To determine whether the contents of two arrays are equal, use the [`std::equal`](../standard-library/algorithm-functions.md#equal) function:
+
+```cpp
+std::equal(std::begin(a), std::end(a), std::begin(b), std::end(b));
+```
+
+### Effect of defining spaceship operator on `==` and `!=`
+
+A definition of the spaceship operator (**`<=>`**) alone will no longer rewrite expressions involving **`==`** or **`!=`** unless the spaceship operator is marked as **`= default`** ([P1185R2](https://wg21.link/p1185r2)). The following example compiles in Visual Studio 2019 RTW and version 16.1, but produces C2678 in Visual Studio 2019 version 16.2:
+
+```cpp
+#include
+
+struct S {
+ int a;
+ auto operator<=>(const S& rhs) const {
+ return a <=> rhs.a;
+ }
+};
+bool eq(const S& lhs, const S& rhs) {
+ return lhs == rhs; // error C2676
+}
+bool neq(const S& lhs, const S& rhs) {
+ return lhs != rhs; // error C2676
+}
+```
+
+To avoid the error, define `operator==` or declare it as defaulted:
+
+```cpp
+#include
+
+struct S {
+ int a;
+ auto operator<=>(const S& rhs) const {
+ return a <=> rhs.a;
+ }
+ bool operator==(const S&) const = default;
+};
+bool eq(const S& lhs, const S& rhs) {
+ return lhs == rhs;
+}
+bool neq(const S& lhs, const S& rhs) {
+ return lhs != rhs;
+}
+```
+
+### Standard Library improvements
+
+- \ `to_chars()` with fixed/scientific precision. (General precision is currently planned for 16.4.)
+- [P0020R6](https://wg21.link/p0020r6): `atomic`, `atomic`, `atomic`
+- [P0463R1](https://wg21.link/p0463r1): endian
+- [P0482R6](https://wg21.link/p0482r6): Library Support For `char8_t`
+- [P0600R1](https://wg21.link/p0600r1): `[[nodiscard]]` For The STL, Part 1
+- [P0653R2](https://wg21.link/p0653r2): `to_address()`
+- [P0754R2](https://wg21.link/p0754r2): \
+- [P0771R1](https://wg21.link/p0771r1): `noexcept` For `std::function`'s move constructor
+
+### Const comparators for associative containers
+
+Code for search and insertion in [`set`](../standard-library/set-class.md), [`map`](../standard-library/map-class.md), [`multiset`](../standard-library/multiset-class.md), and [`multimap`](../standard-library/multimap-class.md) has been merged for reduced code size. Insertion operations now call the less-than comparison on a **`const`** comparison functor, in the same way that search operations have done previously. The following code compiles in Visual Studio 2019 version 16.1 and earlier, but raises C3848 in Visual Studio 2019 version 16.2:
+
+```cpp
+#include
+#include