Skip to content

Commit a3b0eb6

Browse files
authored
Merge pull request #317 from MicrosoftDocs/master
merge to live
2 parents 851d3d6 + 4aee7cc commit a3b0eb6

12 files changed

+193
-53
lines changed

docs/build/reference/TOC.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
##### [-arch (x86)](arch-x86.md)
2020
##### [-arch (x64)](arch-x64.md)
2121
##### [-arch (ARM)](arch-arm.md)
22+
#### [-await (Enable coroutine support)](await-enable-coroutine-support.md)
2223
#### [-bigobj (Increase Number of Sections in .Obj file)](bigobj-increase-number-of-sections-in-dot-obj-file.md)
2324
#### [-C (Preserve Comments During Preprocessing)](c-preserve-comments-during-preprocessing.md)
2425
#### [-c (Compile Without Linking)](c-compile-without-linking.md)
2526
#### [-cgthreads (Code Generation Threads)](cgthreads-code-generation-threads.md)
2627
#### [-clr (Common Language Runtime Compilation)](clr-common-language-runtime-compilation.md)
2728
##### [-clr Restrictions](clr-restrictions.md)
29+
#### [-constexpr (Control constexpr evaluation)](constexpr-control-constexpr-evaluation.md)
2830
#### [-D (Preprocessor Definitions)](d-preprocessor-definitions.md)
2931
#### [-diagnostics (Compiler diagnostics options)](diagnostics-compiler-diagnostic-options.md)
3032
#### [-doc (Process Documentation Comments) (C/C++)](doc-process-documentation-comments-c-cpp.md)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
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>.
50+
51+
## See Also
52+
53+
[Compiler Options](../../build/reference/compiler-options.md)
54+
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)

docs/build/reference/compiler-options-listed-alphabetically.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,21 @@ The following is a comprehensive alphabetical list of compiler options. For a ca
4343
|[/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.|
4444
|[/analyze](../../build/reference/analyze-code-analysis.md)|Enable code analysis.|
4545
|[/arch](../../build/reference/arch-minimum-cpu-architecture.md)|Specifies the architecture for code generation.|
46+
|[/await](await-enable-coroutine-support.md)|Enable coroutines (resumable functions) extensions.|
4647
|[/bigobj](../../build/reference/bigobj-increase-number-of-sections-in-dot-obj-file.md)|Increases the number of addressable sections in an .obj file.|
4748
|[/C](../../build/reference/c-preserve-comments-during-preprocessing.md)|Preserves comments during preprocessing.|
4849
|[/c](../../build/reference/c-compile-without-linking.md)|Compiles without linking.|
4950
|[/cgthreads](../../build/reference/cgthreads-code-generation-threads.md)|Specifies number of cl.exe threads to use for optimization and code generation.|
5051
|[/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.|
5153
|[/D](../../build/reference/d-preprocessor-definitions.md)|Defines constants and macros.|
54+
|[/diagnostics](diagnostics-compiler-diagnostic-options.md)|Controls the format of diagnostic messages.|
5255
|[/doc](../../build/reference/doc-process-documentation-comments-c-cpp.md)|Process documentation comments to an XML file.|
5356
|[/E](../../build/reference/e-preprocess-to-stdout.md)|Copies preprocessor output to standard output.|
5457
|[/EH](../../build/reference/eh-exception-handling-model.md)|Specifies the model of exception handling.|
5558
|[/EP](../../build/reference/ep-preprocess-to-stdout-without-hash-line-directives.md)|Copies preprocessor output to standard output.|
5659
|[/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.|
5761
|[/F](../../build/reference/f-set-stack-size.md)|Sets stack size.|
5862
|[/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.|
5963
|[/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
120124
|[/Ox](../../build/reference/ox-full-optimization.md)|Uses maximum optimization (/Ob2gity /Gs).|
121125
|[/Oy](../../build/reference/oy-frame-pointer-omission.md)|Omits frame pointer (x86 only).|
122126
|[/P](../../build/reference/p-preprocess-to-a-file.md)|Writes preprocessor output to a file.|
127+
|[/permissive-](permissive-standards-conformance.md)|Set standard-conformance mode.|
123128
|[/Qfast_transcendentals](../../build/reference/qfast-transcendentals-force-fast-transcendentals.md)|Generates fast transcendentals.|
124129
|[/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).|
125130
|[/Qimprecise_fwaits](../../build/reference/qimprecise-fwaits-remove-fwaits-inside-try-blocks.md)|Removes `fwait` commands inside `try` blocks.|
@@ -129,11 +134,17 @@ The following is a comprehensive alphabetical list of compiler options. For a ca
129134
|[/RTC](../../build/reference/rtc-run-time-error-checks.md)|Enables run-time error checking.|
130135
|[/sdl](../../build/reference/sdl-enable-additional-security-checks.md)|Enables additional security features and warnings.|
131136
|[/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++.|
134143
|[/U](../../build/reference/u-u-undefine-symbols.md)|Removes a predefined macro.|
135144
|[/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.|
136146
|[/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.|
137148
|[/vd](../../build/reference/vd-disable-construction-displacements.md)|Suppresses or enables hidden vtordisp class members.|
138149
|[/vmb](../../build/reference/vmb-vmg-representation-method.md)|Uses best base for pointers to members.|
139150
|[/vmg](../../build/reference/vmb-vmg-representation-method.md)|Uses full generality for pointers to members.|

docs/build/reference/compiler-options-listed-by-category.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ This article contains a categorical list of compiler options. For an alphabetica
129129

130130
|Option|Purpose|
131131
|------------|-------------|
132+
|[/constexpr](constexpr-control-constexpr-evaluation.md)|Control constexpr evaluation at compile-time.|
132133
|[/openmp](../../build/reference/openmp-enable-openmp-2-0-support.md)|Enables [#pragma omp](../../preprocessor/omp.md) in source code.|
133134
|[/vd](../../build/reference/vd-disable-construction-displacements.md)|Suppresses or enables hidden `vtordisp` class members.|
134135
|[/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
161162
|[/MT](../../build/reference/md-mt-ld-use-run-time-library.md)|Compiles to create a multithreaded executable file, by using LIBCMT.lib.|
162163
|[/MTd](../../build/reference/md-mt-ld-use-run-time-library.md)|Compiles to create a debug multithreaded executable file, by using LIBCMTD.lib.|
163164

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-
173165
### Miscellaneous
174166

175167
|Option|Purpose|
@@ -191,8 +183,10 @@ This article contains a categorical list of compiler options. For an alphabetica
191183
|[/nologo](../../build/reference/nologo-suppress-startup-banner-c-cpp.md)|Suppresses display of sign-on banner.|
192184
|[/sdl](../../build/reference/sdl-enable-additional-security-checks.md)|Enables additional security features and warnings.|
193185
|[/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++.|
196190
|[/V](../../build/reference/v-version-number.md)|Deprecated. Sets the version string.|
197191
|[/w](../../build/reference/compiler-option-warning-level.md)|Disables all warnings.|
198192
|[/W0, /W1, /W2, /W3, /W4](../../build/reference/compiler-option-warning-level.md)|Sets output warning level.|
@@ -202,12 +196,22 @@ This article contains a categorical list of compiler options. For an alphabetica
202196
|[/we](../../build/reference/compiler-option-warning-level.md)|Treats the specified warning as an error.|
203197
|[/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.|
204198
|[/wo](../../build/reference/compiler-option-warning-level.md)|Displays the specified warning only once.|
205-
|[/Wp64](../../build/reference/wp64-detect-64-bit-portability-issues.md)|Obsolete. Detects 64-bit portability problems.|
206199
|[/Wv](../../build/reference/compiler-option-warning-level.md)|Disables warnings introduced by later versions of the compiler.|
207200
|[/WX](../../build/reference/compiler-option-warning-level.md)|Treats warnings as errors.|
201+
|[/Yc](../../build/reference/yc-create-precompiled-header-file.md)|Create .PCH file.|
208202
|[/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.|
209203
|[/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.|
210206
|[/Zm](../../build/reference/zm-specify-precompiled-header-memory-allocation-limit.md)|Specifies the precompiled header memory allocation limit.|
207+
|[/await](await-enable-coroutine-support.md)|Enable coroutines (resumable functions) extensions.|
208+
|[/source-charset](source-charset-set-source-character-set.md)|Set source character set.|
209+
|[/execution-charset](execution-charset-set-execution-character-set.md)|Set execution character set.|
210+
|[/utf-8](utf-8-set-source-and-executable-character-sets-to-utf-8.md)|Set source and execution character sets to UTF-8.|
211+
|[/validate-charset](validate-charset-validate-for-compatible-characters.md)|Validate UTF-8 files for only compatible characters.|
212+
|[/diagnostics](diagnostics-compiler-diagnostic-options.md)|Controls the format of diagnostic messages.|
213+
|[/permissive-](permissive-standards-conformance.md)|Set standard-conformance mode.|
214+
|[/std](std-specify-language-standard-version.md)|C++ standard version compatibility selector.|
211215

212216
### Deprecated and Removed Compiler Options
213217

@@ -222,6 +226,7 @@ This article contains a categorical list of compiler options. For an alphabetica
222226
|[/Og](../../build/reference/og-global-optimizations.md)|Deprecated. Uses global optimizations.|
223227
|[QIfist](../../build/reference/qifist-suppress-ftol.md)|Deprecated. Once used to specify how to convert from a floating-point type to an integral type.|
224228
|[/V](../../build/reference/v-version-number.md)|Deprecated. Sets the .obj file version string.|
229+
|[/Wp64](../../build/reference/wp64-detect-64-bit-portability-issues.md)|Obsolete. Detects 64-bit portability problems.|
225230
|[/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.|
226231
|[/Zc:forScope-](../../build/reference/zc-forscope-force-conformance-in-for-loop-scope.md)|Deprecated. Disables conformance in for loop scope.|
227232
|[/Ze](../../build/reference/za-ze-disable-language-extensions.md)|Deprecated. Enables language extensions.|
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
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>.
63+
64+
## See Also
65+
66+
[Compiler Options](../../build/reference/compiler-options.md)
67+
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)

0 commit comments

Comments
 (0)