[experimental::coro] asserts for equality with noop_coroutine() are not correct
Ex: https://github.com/chriskohlhoff/asio/blob/8869d25/asio/include/asio/experimental/impl/coro.hpp#L1014
According to cppreference:
Return values from different calls to noop_coroutine may and may not compare equal.
Would assert(!coro->awaited_from) suffice?
cc @klemens-morgenstern
Does the noop_coroutine equate to false?
No, it does not, sorry for the confusion.
To give more context to my original problem:
I stumbled upon this when compiling my code with -Og. Running on clang14 + libcpp14 I got the asserts erroneously triggered.
The assert just shouldn't be there, it's left over from development.
@klemens-morgenstern All asserts or not?
https://github.com/chriskohlhoff/asio/blob/8869d25ae2c7eb280ee6048e86b4e3d44f257323/asio/include/asio/experimental/impl/coro.hpp#L1014
https://github.com/chriskohlhoff/asio/blob/8869d25ae2c7eb280ee6048e86b4e3d44f257323/asio/include/asio/experimental/impl/coro.hpp#L1036
https://github.com/chriskohlhoff/asio/blob/8869d25ae2c7eb280ee6048e86b4e3d44f257323/asio/include/asio/experimental/impl/coro.hpp#L1086
https://github.com/chriskohlhoff/asio/blob/8869d25ae2c7eb280ee6048e86b4e3d44f257323/asio/include/asio/experimental/impl/coro.hpp#L1138
All of them are faulty.