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
title: "-await (Enable coroutine support) | Microsoft Docs"
3
+
ms.custom: ""
4
+
ms.date: "08/15/2017"
5
+
ms.reviewer: ""
6
+
ms.suite: ""
7
+
ms.technology:
8
+
- "cpp-tools"
9
+
ms.tgt_pltfrm: ""
10
+
ms.topic: "article"
11
+
f1_keywords:
12
+
- "/await"
13
+
- "-await"
14
+
dev_langs:
15
+
- "C++"
16
+
helpviewer_keywords:
17
+
- "/await enable coroutine support [C++]"
18
+
- "-await enable coroutine support [C++]"
19
+
- "await enable coroutine support [C++]"
20
+
ms.assetid: 302c8e69-09b6-4c58-bcdd-0a6a8713a8df
21
+
author: "corob-msft"
22
+
ms.author: "corob"
23
+
manager: "ghogen"
24
+
---
25
+
# /await (Enable coroutine support)
26
+
27
+
Use the **/await** compiler option to enable compiler support for coroutines.
28
+
29
+
## Syntax
30
+
31
+
> /await
32
+
33
+
## Remarks
34
+
35
+
The **/await** compiler option enables compiler support for C++ coroutines and the keywords **co_await**, **co_yield**, and **co_return**. This option is off by default. For information about support for coroutines in Visual Studio, see the [Visual Studio Team Blog](https://blogs.msdn.microsoft.com/vcblog/category/coroutine/). For more information about the coroutines standard proposal, see [N4628 Working Draft, Technical Specification for C++ Extensions for Coroutines](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4628.pdf).
36
+
37
+
The **/await** option is available beginning in Visual Studio 2015.
38
+
39
+
### To set this compiler option in the Visual Studio development environment
40
+
41
+
1. Open your project's **Property Pages** dialog box.
42
+
43
+
2. Under **Configuration Properties**, expand the **C/C++** folder and choose the **Command Line** property page.
44
+
45
+
3. Enter the **/await** compiler option in the **Additional Options** box. Choose **OK** or **Apply** to save your changes.
46
+
47
+
### To set this compiler option programmatically
48
+
49
+
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.
Copy file name to clipboardExpand all lines: docs/build/reference/compiler-options-listed-alphabetically.md
+13-2Lines changed: 13 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -43,17 +43,21 @@ The following is a comprehensive alphabetical list of compiler options. For a ca
43
43
|[/AI](../../build/reference/ai-specify-metadata-directories.md)|Specifies a directory to search to resolve file references passed to the [#using](../../preprocessor/hash-using-directive-cpp.md) directive.|
|[/bigobj](../../build/reference/bigobj-increase-number-of-sections-in-dot-obj-file.md)|Increases the number of addressable sections in an .obj file.|
47
48
|[/C](../../build/reference/c-preserve-comments-during-preprocessing.md)|Preserves comments during preprocessing.|
48
49
|[/c](../../build/reference/c-compile-without-linking.md)|Compiles without linking.|
49
50
|[/cgthreads](../../build/reference/cgthreads-code-generation-threads.md)|Specifies number of cl.exe threads to use for optimization and code generation.|
50
51
|[/clr](../../build/reference/clr-common-language-runtime-compilation.md)|Produces an output file to run on the common language runtime.|
52
+
|[/constexpr](constexpr-control-constexpr-evaluation.md)|Control constexpr evaluation at compile-time.|
51
53
|[/D](../../build/reference/d-preprocessor-definitions.md)|Defines constants and macros.|
54
+
|[/diagnostics](diagnostics-compiler-diagnostic-options.md)|Controls the format of diagnostic messages.|
52
55
|[/doc](../../build/reference/doc-process-documentation-comments-c-cpp.md)|Process documentation comments to an XML file.|
53
56
|[/E](../../build/reference/e-preprocess-to-stdout.md)|Copies preprocessor output to standard output.|
54
57
|[/EH](../../build/reference/eh-exception-handling-model.md)|Specifies the model of exception handling.|
55
58
|[/EP](../../build/reference/ep-preprocess-to-stdout-without-hash-line-directives.md)|Copies preprocessor output to standard output.|
56
59
|[/errorReport](../../build/reference/errorreport-report-internal-compiler-errors.md)|Allows you to provide internal compiler error (ICE) information directly to the Visual C++ team.|
60
+
|[/execution-charset](execution-charset-set-execution-character-set.md)|Set execution character set.|
|[/favor](../../build/reference/favor-optimize-for-architecture-specifics.md)|Produces code that is optimized for a specific [!INCLUDE[vcprx64](../../assembler/inline/includes/vcprx64_md.md)] architecture or for the specifics of micro-architectures in both the AMD64 and Extended Memory 64 Technology (EM64T) architectures.|
59
63
|[/FA](../../build/reference/fa-fa-listing-file.md)|Creates a listing file.|
@@ -120,6 +124,7 @@ The following is a comprehensive alphabetical list of compiler options. For a ca
120
124
|[/Ox](../../build/reference/ox-full-optimization.md)|Uses maximum optimization (/Ob2gity /Gs).|
|[/Qfast_transcendentals](../../build/reference/qfast-transcendentals-force-fast-transcendentals.md)|Generates fast transcendentals.|
124
129
|[/QIfist](../../build/reference/qifist-suppress-ftol.md)|Deprecated. Suppresses `_ftol` when a conversion from a floating-point type to an integral type is required (x86 only).|
|[/sdl](../../build/reference/sdl-enable-additional-security-checks.md)|Enables additional security features and warnings.|
131
136
|[/showIncludes](../../build/reference/showincludes-list-include-files.md)|Displays a list of include files during compilation.|
132
-
|[/Tc](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)<br /><br /> [/TC](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies a C source file.|
133
-
|[/Tp](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)<br /><br /> [/TP](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies a C++ source file.|
137
+
|[/source-charset](source-charset-set-source-character-set.md)|Set source character set.|
138
+
|[/std](std-specify-language-standard-version.md)|C++ standard version compatibility selector.|
139
+
|[/Tc](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies a C source file.|
140
+
|[/TC](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies all source files are C.|
141
+
|[/Tp](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies a C++ source file.|
142
+
|[/TP](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies all source files are C++.|
134
143
|[/U](../../build/reference/u-u-undefine-symbols.md)|Removes a predefined macro.|
135
144
|[/u](../../build/reference/u-u-undefine-symbols.md)|Removes all predefined macros.|
145
+
|[/utf-8](utf-8-set-source-and-executable-character-sets-to-utf-8.md)|Set source and execution character sets to UTF-8.|
136
146
|[/V](../../build/reference/v-version-number.md)|Deprecated. Sets the .obj file version string.|
147
+
|[/validate-charset](validate-charset-validate-for-compatible-characters.md)|Validate UTF-8 files for only compatible characters.|
137
148
|[/vd](../../build/reference/vd-disable-construction-displacements.md)|Suppresses or enables hidden vtordisp class members.|
138
149
|[/vmb](../../build/reference/vmb-vmg-representation-method.md)|Uses best base for pointers to members.|
139
150
|[/vmg](../../build/reference/vmb-vmg-representation-method.md)|Uses full generality for pointers to members.|
Copy file name to clipboardExpand all lines: docs/build/reference/compiler-options-listed-by-category.md
+17-12Lines changed: 17 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -129,6 +129,7 @@ This article contains a categorical list of compiler options. For an alphabetica
129
129
130
130
|Option|Purpose|
131
131
|------------|-------------|
132
+
|[/constexpr](constexpr-control-constexpr-evaluation.md)|Control constexpr evaluation at compile-time.|
132
133
|[/openmp](../../build/reference/openmp-enable-openmp-2-0-support.md)|Enables [#pragma omp](../../preprocessor/omp.md) in source code.|
133
134
|[/vd](../../build/reference/vd-disable-construction-displacements.md)|Suppresses or enables hidden `vtordisp` class members.|
134
135
|[/vmb](../../build/reference/vmb-vmg-representation-method.md)|Uses best base for pointers to members.|
@@ -161,15 +162,6 @@ This article contains a categorical list of compiler options. For an alphabetica
161
162
|[/MT](../../build/reference/md-mt-ld-use-run-time-library.md)|Compiles to create a multithreaded executable file, by using LIBCMT.lib.|
162
163
|[/MTd](../../build/reference/md-mt-ld-use-run-time-library.md)|Compiles to create a debug multithreaded executable file, by using LIBCMTD.lib.|
163
164
164
-
### Precompiled Header
165
-
166
-
|Option|Purpose|
167
-
|------------|-------------|
168
-
|[/Y-](../../build/reference/y-ignore-precompiled-header-options.md)|Ignores all other precompiled-header compiler options in the current build.|
169
-
|[/Yc](../../build/reference/yc-create-precompiled-header-file.md)|Creates a precompiled header file.|
170
-
|[/Yd](../../build/reference/yd-place-debug-information-in-object-file.md)|Places complete debugging information in all object files.|
171
-
|[/Yu](../../build/reference/yu-use-precompiled-header-file.md)|Uses a precompiled header file during build.|
172
-
173
165
### Miscellaneous
174
166
175
167
|Option|Purpose|
@@ -191,8 +183,10 @@ This article contains a categorical list of compiler options. For an alphabetica
191
183
|[/nologo](../../build/reference/nologo-suppress-startup-banner-c-cpp.md)|Suppresses display of sign-on banner.|
192
184
|[/sdl](../../build/reference/sdl-enable-additional-security-checks.md)|Enables additional security features and warnings.|
193
185
|[/showIncludes](../../build/reference/showincludes-list-include-files.md)|Displays a list of all include files during compilation.|
194
-
|[/Tc](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)[/TC](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies a C source file.|
195
-
|[/Tp](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)[/TP](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies a C++ source file.|
186
+
|[/Tc](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies a C source file.|
187
+
|[/TC](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies all source files are C.|
188
+
|[/Tp](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies a C++ source file.|
189
+
|[/TP](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md)|Specifies all source files are C++.|
196
190
|[/V](../../build/reference/v-version-number.md)|Deprecated. Sets the version string.|
197
191
|[/w](../../build/reference/compiler-option-warning-level.md)|Disables all warnings.|
@@ -202,12 +196,22 @@ This article contains a categorical list of compiler options. For an alphabetica
202
196
|[/we](../../build/reference/compiler-option-warning-level.md)|Treats the specified warning as an error.|
203
197
|[/WL](../../build/reference/wl-enable-one-line-diagnostics.md)|Enables one-line diagnostics for error and warning messages when compiling C++ source code from the command line.|
204
198
|[/wo](../../build/reference/compiler-option-warning-level.md)|Displays the specified warning only once.|
|[/Yd](../../build/reference/yd-place-debug-information-in-object-file.md)|Deprecated. Places complete debugging information in all object files. Use [/Zi](../../build/reference/z7-zi-zi-debug-information-format.md) instead.|
209
203
|[/Yl](../../build/reference/yl-inject-pch-reference-for-debug-library.md)|Injects a PCH reference when creating a debug library.|
204
+
|[/Yu](../../build/reference/yu-use-precompiled-header-file.md)|Uses a precompiled header file during build.|
205
+
|[/Y-](../../build/reference/y-ignore-precompiled-header-options.md)|Ignores all other precompiled-header compiler options in the current build.|
210
206
|[/Zm](../../build/reference/zm-specify-precompiled-header-memory-allocation-limit.md)|Specifies the precompiled header memory allocation limit.|
|[/std](std-specify-language-standard-version.md)|C++ standard version compatibility selector.|
211
215
212
216
### Deprecated and Removed Compiler Options
213
217
@@ -222,6 +226,7 @@ This article contains a categorical list of compiler options. For an alphabetica
222
226
|[/Og](../../build/reference/og-global-optimizations.md)|Deprecated. Uses global optimizations.|
223
227
|[QIfist](../../build/reference/qifist-suppress-ftol.md)|Deprecated. Once used to specify how to convert from a floating-point type to an integral type.|
224
228
|[/V](../../build/reference/v-version-number.md)|Deprecated. Sets the .obj file version string.|
|[/Yd](../../build/reference/yd-place-debug-information-in-object-file.md)|Deprecated. Places complete debugging information in all object files. Use [/Zi](../../build/reference/z7-zi-zi-debug-information-format.md) instead.|
226
231
|[/Zc:forScope-](../../build/reference/zc-forscope-force-conformance-in-for-loop-scope.md)|Deprecated. Disables conformance in for loop scope.|
227
232
|[/Ze](../../build/reference/za-ze-disable-language-extensions.md)|Deprecated. Enables language extensions.|
title: "-constexpr (Control constexpr evaluation) | Microsoft Docs"
3
+
ms.custom: ""
4
+
ms.date: "08/15/2017"
5
+
ms.reviewer: ""
6
+
ms.suite: ""
7
+
ms.technology:
8
+
- "cpp-tools"
9
+
ms.tgt_pltfrm: ""
10
+
ms.topic: "article"
11
+
f1_keywords:
12
+
- "/constexpr"
13
+
- "-constexpr"
14
+
dev_langs:
15
+
- "C++"
16
+
helpviewer_keywords:
17
+
- "/constexpr control constexpr evaluation [C++]"
18
+
- "-constexpr control constexpr evaluation [C++]"
19
+
- "constexpr control constexpr evaluation [C++]"
20
+
ms.assetid: 76d56784-f5ad-401d-841d-09d1059e8b8c
21
+
author: "corob-msft"
22
+
ms.author: "corob"
23
+
manager: "ghogen"
24
+
---
25
+
# /constexpr (Control constexpr evaluation)
26
+
27
+
Use the **/constexpr** compiler options to control parameters for `constexpr` evaluation at compile time.
28
+
29
+
## Syntax
30
+
31
+
> /constexpr:depth*N*
32
+
> /constexpr:backtrace*N*
33
+
> /constexpr:steps*N*
34
+
35
+
## Arguments
36
+
37
+
**depth***N*
38
+
Limit the depth of recursive `constexpr` function invocation to *N* levels. The default is 512.
39
+
40
+
**backtrace***N*
41
+
Show up to *N*`constexpr` evaluations in diagnostics. The default is 10.
42
+
43
+
**steps***N*
44
+
Terminate `constexpr` evaluation after *N* steps. The default is 100,000.
45
+
46
+
## Remarks
47
+
48
+
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).
49
+
50
+
The **/constexpr** options are available beginning in Visual Studio 2015.
51
+
52
+
### To set this compiler option in the Visual Studio development environment
53
+
54
+
1. Open your project's **Property Pages** dialog box.
55
+
56
+
2. Under **Configuration Properties**, expand the **C/C++** folder and choose the **Command Line** property page.
57
+
58
+
3. Enter any **/constexpr** compiler options in the **Additional Options** box. Choose **OK** or **Apply** to save your changes.
59
+
60
+
### To set this compiler option programmatically
61
+
62
+
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.
0 commit comments