experimental/coroutine

i can see the <experimental/coroutine> header, but how do i use it?

all examples i found rely on co_await, etc, but these are not in the header.

Answered by yetanothermeagain in 399114022

i was able to do that specifying -fcoroutines-ts in other C++ flags of Xcode. C++17

I think that is only in C++20. It is going to be a while before clang supports that.

partially answering myself: i had to specify -fcoroutines-ts in other C++ flags, after that the following test worked:


https://wandbox.org/permlink/Dth1IO5q8Oe31ew2


ftm, i also specified C++17 and libc++ in compiler settings


anyone has a woring example that uses co_await in Xcode?

Accepted Answer

i was able to do that specifying -fcoroutines-ts in other C++ flags of Xcode. C++17

experimental/coroutine
 
 
Q