Skip to content

Commit 5c376e2

Browse files
TylerMSFTTylerMSFT
authored andcommitted
update permissive topic as well
1 parent 65c9450 commit 5c376e2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/build/reference/permissive-standards-conformance.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: "/permissive- (Standards conformance)"
33
description: "Reference guide to the Microsoft C++ /permissive- (Standards conformance) compiler option."
4-
ms.date: 12/14/2022
4+
ms.date: 10/12/2023
55
f1_keywords: ["/permissive", "VC.Project.VCCLCompilerTool.ConformanceMode"]
66
helpviewer_keywords: ["/permissive compiler options [C++]", "-permissive compiler options [C++]", "Standards conformance compiler options", "permissive compiler options [C++]"]
7-
ms.assetid: db1cc175-6e93-4a2e-9396-c3725d2d8f71
87
---
98
# `/permissive-` (Standards conformance)
109

@@ -33,6 +32,8 @@ The **`/permissive-`** option sets the [`/Zc:referenceBinding`](zc-referencebind
3332

3433
In versions of the compiler beginning in Visual Studio 2017 version 15.3, the **`/permissive-`** option sets the [`/Zc:ternary`](zc-ternary.md) option. The compiler also implements more of the requirements for two-phase name look-up. When the **`/permissive-`** option is set, the compiler parses function and class template definitions, and identifies dependent and non-dependent names used in the templates. In this release, only name dependency analysis is performed.
3534

35+
As of Visual Studio 2022 Update 17.6, the **`/permissive-`** option sets the [`Zc:lambda`](zc-lamda.md) and [`/Zc:externConstexpr`](zc-externconstexpr.md) options. In prior versions, **`/permissive-`** didn't set either one.
36+
3637
Environment-specific extensions and language areas that the standard leaves up to the implementation aren't affected by **`/permissive-`**. For example, the Microsoft-specific **`__declspec`**, calling convention and structured exception handling keywords, and compiler-specific `pragma` directives or attributes aren't flagged by the compiler in **`/permissive-`** mode.
3738

3839
The MSVC compiler in earlier versions of Visual Studio 2017 doesn't support all C++11, C++14, or C++17 standards-conforming code. Depending on the version of Visual Studio, the **`/permissive-`** option may not detect issues in some aspects of two-phase name lookup, binding a non-const reference to a temporary, treating copy init as direct init, allowing multiple user-defined conversions in initialization, or alternative tokens for logical operators, and other non-supported conformance areas. For more information about conformance issues in Visual C++, see [Nonstandard Behavior](../../cpp/nonstandard-behavior.md). To get the most out of **`/permissive-`**, update Visual Studio to the latest version.

docs/build/reference/zc-externconstexpr.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The **`/Zc:externConstexpr`** compiler option causes the compiler to apply exter
1919

2020
In earlier versions of Visual Studio, by default or if **`/Zc:externConstexpr-`** is specified, Visual Studio applies internal linkage to **`constexpr`** variables even if the **`extern`** keyword is used. The **`/Zc:externConstexpr`** option is available starting in Visual Studio 2017 Update 15.6. and is off by default.
2121

22-
As of Visual Studio 2022 Update 17.6, the **`/permissive-`** option enables both **`/Zc:lambda`** and **`/Zc:externConstexpr`**. In prior versions, **`/permissive-`** didn't enable either one.
22+
As of Visual Studio 2022 Update 17.6, the **`/permissive-`** option enables both **`/Zc:externConstexpr`** and [`/Zc:lambda`](zc-lamda.md). In prior versions, **`/permissive-`** didn't enable either one.
2323

2424
If a header file contains a variable declared **`extern constexpr`**, it must be marked [`__declspec(selectany)`](../../cpp/selectany.md) in order to merge the duplicate declarations into a single instance in the linked binary. Otherwise you may see linker errors, for example, LNK2005, for violations of the one-definition rule.
2525

@@ -33,5 +33,7 @@ If a header file contains a variable declared **`extern constexpr`**, it must be
3333

3434
## See also
3535

36-
[`/Zc` (Conformance)](zc-conformance.md)<br/>
3736
[`auto` Keyword](../../cpp/auto-cpp.md)
37+
[`permissive`](permissive-standards-conformance.md)\
38+
[`/Zc` (Conformance)](zc-conformance.md)\
39+
[`/Zc:lambda`](zc-lamda.md)\

0 commit comments

Comments
 (0)