Skip to content

Commit 9fb8b51

Browse files
authored
Merge pull request #5741 from MicrosoftDocs/main
1/17/2025 AM Publish
2 parents e7226c8 + a7c9dc0 commit 9fb8b51

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

docs/build/reference/zc-static-assert.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: /Zc:static_assert (Strict static_assert handling)"
33
title: "/Zc:static_assert (Strict static_assert handling)"
4-
ms.date: 12/15/2021
4+
ms.date: 1/15/2025
55
f1_keywords: ["/Zc:static_assert"]
66
helpviewer_keywords: ["/Zc:static_assert compiler option (C++)"]
77
---
@@ -16,7 +16,9 @@ The **`/Zc:static_assert`** compiler option tells the compiler to evaluate `stat
1616
1717
## Remarks
1818

19-
The **`/Zc:static_assert`** compiler option tells the compiler to evaluate a `static_assert` in the body of a function template or in the body of a class template member function when first parsed, if the test expression isn't dependent. If the non-dependent test expression isn't `false`, the compiler emits an error immediately. When the test expression is dependent, the `static_assert` isn't evaluated until the template is instantiated.
19+
Starting with Visual Studio 17.10, `/Zc:static_assert` and `/Zc:static_assert-` have no effect. Both options are ignored to avoid breaking builds that use them. `static_assert` is now never evaluated when parsing class or function templates.
20+
21+
The **`/Zc:static_assert`** compiler option tells the compiler to evaluate a `static_assert` in the body of a function template or in the body of a class template member function when first parsed, if the test expression isn't dependent. If the non-dependent test expression is `false`, the compiler emits an error immediately. When the test expression is dependent, the `static_assert` isn't evaluated until the template is instantiated.
2022

2123
The **`/Zc:static_assert`** option is available starting in Visual Studio 2022 version 17.1. In earlier versions of Visual Studio, or if **`/Zc:static_assert-`** is specified, Visual Studio doesn't do dependent analysis if the `static_assert` is within the body of a function template or within the body of a member function of a class template. Instead, it only evaluates the `static_assert` when a template is instantiated.
2224

docs/ide/refactoring/change-signature.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
description: "Learn more about: Change Signature"
33
title: "Change Signature"
44
ms.date: "09/18/2022"
5+
f1_keywords: ["vc.pkg.refactoring.changesignaturedlg"]
56
---
67
# Change Signature
78

docs/ide/refactoring/extract-function.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
description: "Learn more about: Extract Function"
33
title: "Extract Function"
44
ms.date: "09/18/2022"
5+
f1_keywords: ["vc.pkg.refactoring.extractfuncdlg"]
56
---
67
# Extract Function
78

docs/ide/refactoring/rename.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
description: "Learn more about: Rename"
33
title: "Rename"
44
ms.date: "09/19/2022"
5+
f1_keywords: ["vc.pkg.refactoring.renamedlg"]
56
---
67
# Rename
78

0 commit comments

Comments
 (0)