Skip to content

Commit aa116a3

Browse files
authored
Merge pull request #5872 from TylerMSFT/uuf
address feedback
2 parents e9eac07 + caf10c3 commit aa116a3

File tree

2 files changed

+22
-28
lines changed

2 files changed

+22
-28
lines changed
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,48 @@
11
---
22
description: "Learn more about: /constexpr (Control constexpr evaluation)"
33
title: "/constexpr (Control constexpr evaluation)"
4-
ms.date: "08/15/2017"
4+
ms.date: 04/14/2025
55
f1_keywords: ["/constexpr", "-constexpr"]
66
helpviewer_keywords: ["/constexpr control constexpr evaluation [C++]", "-constexpr control constexpr evaluation [C++]", "constexpr control constexpr evaluation [C++]"]
7-
ms.assetid: 76d56784-f5ad-401d-841d-09d1059e8b8c
87
---
98
# /constexpr (Control constexpr evaluation)
109

11-
Use the **/constexpr** compiler options to control parameters for **`constexpr`** evaluation at compile time.
10+
Use the **`/constexpr`** compiler options to control parameters for **`constexpr`** evaluation at compile time.
1211

1312
## Syntax
1413

15-
> **/constexpr:depth**<em>N</em>\
16-
> **/constexpr:backtrace**<em>N</em>\
17-
> **/constexpr:steps**<em>N</em>
14+
> `/constexpr:depth`<em>N</em>\
15+
> `/constexpr:backtrace`<em>N</em>\
16+
> `/constexpr:steps`<em>N</em>
1817
1918
## Arguments
2019

21-
**depth**<em>N</em>
20+
**`depth`**<em>N</em>\
2221
Limit the depth of recursive **`constexpr`** function invocation to *N* levels. The default is 512.
2322

24-
**backtrace**<em>N</em>
23+
**`backtrace`**<em>N</em>\
2524
Show up to *N* **`constexpr`** evaluations in diagnostics. The default is 10.
2625

27-
**steps**<em>N</em>
28-
Terminate **`constexpr`** evaluation after *N* steps. The default is 100,000.
26+
**`steps`**<em>N</em>\
27+
Terminate **`constexpr`** evaluation after *N* steps. The default is 100,000. A step refers to an individual computation taken towards evaluating the constant expression. Increasing the maximum number of steps might cause compilation to take longer in cases where compilation would otherwise fail.
2928

3029
## Remarks
3130

32-
The **/constexpr** compiler options control compile-time evaluation of **`constexpr`** expressions. Evaluation steps, recursion levels, and backtrace depth are controlled to prevent the compiler from spending too much time on **`constexpr`** evaluation. For more information on the **`constexpr`** language element, see [constexpr (C++)](../../cpp/constexpr-cpp.md).
31+
The **`/constexpr`** compiler options control compile-time evaluation of **`constexpr`** expressions. Evaluation steps, recursion levels, and backtrace depth are controlled to prevent the compiler from spending too much time on **`constexpr`** evaluation. For more information on the **`constexpr`** language element, see [`constexpr` (C++)](../../cpp/constexpr-cpp.md).
3332

34-
The **/constexpr** options are available beginning in Visual Studio 2015.
33+
The **`/constexpr`** flag is available beginning in Visual Studio 2015.
3534

3635
### To set this compiler option in the Visual Studio development environment
3736

3837
1. Open your project's **Property Pages** dialog box.
39-
4038
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
41-
42-
1. Enter any **/constexpr** compiler options in the **Additional Options** box. Choose **OK** or **Apply** to save your changes.
39+
1. Enter **/constexpr** compiler options in the **Additional Options** box. Choose **OK** to save your changes.
4340

4441
### To set this compiler option programmatically
4542

4643
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.
4744

4845
## See also
4946

50-
[MSVC Compiler Options](compiler-options.md)<br/>
47+
[MSVC Compiler Options](compiler-options.md)\
5148
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)

docs/build/reference/u-u-undefine-symbols.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
title: "/U, /u (Undefine symbols)"
33
description: "Use the Microsoft C/C++ compiler /U and /u options to undefine preprocessor symbols."
4-
ms.date: 09/03/2020
4+
ms.date: 04/14/2025
55
f1_keywords: ["VC.Project.VCCLCompilerTool.UndefinePreprocessorDefinitions", "VC.Project.VCCLWCECompilerTool.UndefinePreprocessorDefinitions", "VC.Project.VCCLCompilerTool.UndefineAllPreprocessorDefinitions", "/u", "VC.Project.VCCLWCECompilerTool.UndefineAllPreprocessorDefinitions"]
66
helpviewer_keywords: ["-U compiler option [C++]", "Undefine Symbols compiler option", "/U compiler option [C++]", "U compiler option [C++]"]
7-
ms.assetid: 7bc0474f-6d1f-419b-807d-0d8816763b2a
87
---
9-
# /U, /u (Undefine symbols)
8+
# `/U`, `/u` (Undefine symbols)
109

1110
The **`/U`** compiler option undefines the specified preprocessor symbol. The **`/u`** compiler option undefines the Microsoft-specific symbols that the compiler defines.
1211

@@ -17,7 +16,7 @@ The **`/U`** compiler option undefines the specified preprocessor symbol. The **
1716
1817
## Arguments
1918

20-
*symbol*<br/>
19+
*`symbol`*\
2120
The preprocessor symbol to undefine.
2221

2322
## Remarks
@@ -44,9 +43,7 @@ For a complete list of Microsoft-specific predefined macros, see [Predefined mac
4443
### To set this compiler option in the Visual Studio development environment
4544

4645
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
47-
48-
1. Select the **Configuration Properties** > **C/C++** > **Advanced** property page.
49-
46+
1. Select the **Configuration Properties** > **C/C++** > **Preprocessor** property page.
5047
1. Modify the **Undefine Preprocessor Definitions** or **Undefine All Preprocessor Definitions** properties.
5148

5249
### To set this compiler option programmatically
@@ -55,9 +52,9 @@ For a complete list of Microsoft-specific predefined macros, see [Predefined mac
5552

5653
## See also
5754

58-
[MSVC compiler options](compiler-options.md)<br/>
59-
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)<br/>
60-
[**`/J`** (Default char type is unsigned)](j-default-char-type-is-unsigned.md)<br/>
61-
[**`/GR`** (Enable run-time type information)](gr-enable-run-time-type-information.md)<br/>
62-
[**`/EH`** (Exception handling model)](eh-exception-handling-model.md)<br/>
55+
[MSVC compiler options](compiler-options.md)\
56+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\
57+
[**`/J`** (Default char type is unsigned)](j-default-char-type-is-unsigned.md)\
58+
[**`/GR`** (Enable run-time type information)](gr-enable-run-time-type-information.md)\
59+
[**`/EH`** (Exception handling model)](eh-exception-handling-model.md)\
6360
[**`/MD`**, **`/MT`**, **`/LD`** (Use run-time library)](md-mt-ld-use-run-time-library.md)

0 commit comments

Comments
 (0)