-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
I work on the Visual C++ team, where we regularly build popular open-source projects, including Calculator, with development versions of the MSVC Build Tools in order to find and fix regressions before they can ship and cause trouble for you. This also allows us to provide advance notice of breaking changes, which is the case here.
In the MSVC Build Tools 14.50 shipping in Visual Studio 2026 18.0, the /await compiler option is officially being deprecated. This is a command-line deprecation warning that does not break builds (even under /WX):
C:\Temp>type meow.cpp
int main() {}
C:\Temp>cl /EHsc /nologo /W4 /await meow.cpp
cl : Command line warning D9047 : option 'await' has been deprecated and will be removed in a future release.
Standard C++ coroutines are available by default in C++20 or later, or use '/await:strict' in earlier language modes.
meow.cpp
In the MSVC Build Tools 14.51 shipping in some future update to Visual Studio 2026, I am additionally deprecating the <experimental/coroutine>, <experimental/resumable>, and <experimental/generator> headers, as the first two have been superseded by C++20 <coroutine> and the third has been superseded by C++23 <generator>. This is a "hard deprecation" implemented as a static_assert. It can be acknowledged and silenced with an escape hatch macro, but future removal is coming. (PR: microsoft/STL#5804 )
We've found that Calculator contains several uses of the /await compiler option and one use of <experimental/resumable>. You should migrate to Standard coroutines now (i.e. include <coroutine> instead). This is best done by migrating to C++20, but we additionally support Standard <coroutine> "downlevel" in C++14 and C++17 modes if you explicitly opt-in with the /await:strict compiler option.
<experimental/resumable> usage:
calculator/src/CalculatorUnitTests/pch.h
Line 36 in 48b559e
| #include <experimental/resumable> |
/await usage:
There are several occurrences in each file, I'm just citing one each:
| <AdditionalOptions>/Zm250 /await /std:c++17 /permissive- /Zc:twoPhase- /utf-8 /w44242 %(AdditionalOptions)</AdditionalOptions> |
| <AdditionalOptions>/bigobj /await /std:c++17 /permissive- /Zc:twoPhase- /utf-8 /w44242 %(AdditionalOptions)</AdditionalOptions> |
| <AdditionalOptions>/bigobj /await /w44242 %(AdditionalOptions)</AdditionalOptions> |
| <AdditionalOptions>/bigobj /await /std:c++17 /utf-8 /w44242 %(AdditionalOptions)</AdditionalOptions> |
| <AdditionalOptions>/bigobj /w44242 /await %(AdditionalOptions)</AdditionalOptions> |
| <AdditionalOptions>/bigobj /await /std:c++17 /utf-8 /w44242 %(AdditionalOptions)</AdditionalOptions> |