/await (Enable coroutine support)

Use the /await compiler option to enable compiler support for coroutines.




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. For more information about the coroutines standard proposal, see N4628 Working Draft, Technical Specification for C++ Extensions for Coroutines.

The /await option is available beginning in Visual Studio 2015.

To set this compiler option in the Visual Studio development environment

  1. Open your project's Property Pages dialog box.

  2. Under Configuration Properties, expand the C/C++ folder and choose the Command Line property page.

  3. Enter the /await compiler option in the Additional Options box. Choose OK or Apply to save your changes.

To set this compiler option programmatically

See also

MSVC Compiler Options
MSVC Compiler Command-Line Syntax