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
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
8
7
---
9
8
# /constexpr (Control constexpr evaluation)
10
9
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.
12
11
13
12
## Syntax
14
13
@@ -18,34 +17,32 @@ Use the **/constexpr** compiler options to control parameters for **`constexpr`*
18
17
19
18
## Arguments
20
19
21
-
**depth**<em>N</em>
20
+
**`depth`**<em>N</em>
22
21
Limit the depth of recursive **`constexpr`** function invocation to *N* levels. The default is 512.
23
22
24
-
**backtrace**<em>N</em>
23
+
**`backtrace`**<em>N</em>
25
24
Show up to *N***`constexpr`** evaluations in diagnostics. The default is 10.
26
25
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.
29
28
30
29
## Remarks
31
30
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).
33
32
34
-
The **/constexpr**options are available beginning in Visual Studio 2015.
33
+
The **`/constexpr`**flag is available beginning in Visual Studio 2015.
35
34
36
35
### To set this compiler option in the Visual Studio development environment
37
36
38
37
1. Open your project's **Property Pages** dialog box.
The **`/U`** compiler option undefines the specified preprocessor symbol. The **`/u`** compiler option undefines the Microsoft-specific symbols that the compiler defines.
12
11
@@ -17,7 +16,7 @@ The **`/U`** compiler option undefines the specified preprocessor symbol. The **
17
16
18
17
## Arguments
19
18
20
-
*symbol*<br/>
19
+
*`symbol`*\
21
20
The preprocessor symbol to undefine.
22
21
23
22
## Remarks
@@ -44,9 +43,7 @@ For a complete list of Microsoft-specific predefined macros, see [Predefined mac
44
43
### To set this compiler option in the Visual Studio development environment
45
44
46
45
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).
0 commit comments