lewissbaker / cppcoro

A library of C++ coroutine abstractions for the coroutines TS
MIT License
3.43k stars 472 forks source link

VS2019: all classes with operator co_await() produce error on compilation: Error C3773 Use of 'co_await' in this context is a non - conforming extension in C++20 #159

Open newfeatureengineer opened 4 years ago

newfeatureengineer commented 4 years ago

On VS 2019 16.7.1, when language is set to c++latest, I errors such as:

Severity    Code    Description Project File    Line    Suppression State
Error   C3773   Use of 'co_await' in this context is a non-conforming extension in C++20    threads C:\vcpkg\installed\x64-windows\include\cppcoro\task.hpp 412 

for any occurrence of operator co_await().

JimboLyon commented 4 years ago

Adding the switch /await to the msc command line should cure this.

newfeatureengineer commented 4 years ago

Yes, this solved it, maybe add it to the readme?