I have a code that looks like this:
auto func() -> asio::awaitable<void> { try { co_await async_operation(); } catch(boost::system::system_error const& e) { co_return co_await another_async_operation(); }}
This code worked perfectly with GCC 11, but with GCC 12 it won't compile:
file.cpp:3:19: error: await expressions are not permitted in handlers 3 | co_return co_await another_async_operation(); | ^~~~~~~~
Why is that and how can I fix it?