Artem
Artem
Can we merge these changes?
Hi, @rollbear! I tried to add ```c++ else if constexpr (requires {typename std::ranges::range_value_t;}) { return type_wrapper{}; } ``` to `trompeloeil::coro_value_type::func()` and it works for generator-like coroutines since they are ranges...
I've noticed in tests, that provided `coro::generator` is awaitable and used via `co_await`, but generators are not awaitables and shall be used as range. Also, `TIMES()` directive doesn't work properly...
After some research I've come to the conclusion that it is impossible to mock general c++20 coroutines, mainly because expressions `co_yield`, `co_await` and `co_return` must be inlined in the function...
Sure, it was thoughts aloud :)
I guess, the implementation for coroutines will be the same as for functions, except some things around lifetime management. `foo()` return type is known and it is enough just to...
Coroutines might be custom and it is allowed, but there are no such standard coroutines. ```c++ []() -> /* custom coroutine type */ { co_yield 1; co_yield; co_yield "Hello, world!";...