Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use the /constexpr
compiler options to control parameters for constexpr
evaluation at compile time.
/constexpr:depth
N
/constexpr:backtrace
N
/constexpr:steps
N
depth
N
Limit the depth of recursive constexpr
function invocation to N levels. The default is 512.
backtrace
N
Show up to N constexpr
evaluations in diagnostics. The default is 10.
steps
N
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.
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++).
The /constexpr
flag is available beginning in Visual Studio 2015.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in