Is there a way that my macro can detect that it’s running in a C++ coroutine?

1 · Raymond Chen · Oct. 11, 2021, 2:21 p.m.
Say you are writing a macro that wants to behave differently depending on whether it is expanded inside a coroutine or not. Specifically, you want to expand to return in a regular function, but co_return in a coroutine. template<T> T&& TraceValue(T&& The post Is there a way that my macro can detect that it’s running in a C++ coroutine? appeared first on The Old New Thing....