Open Tradias opened 11 months ago
With the above change this line ha to be modified
to if (result.ex_ && *result.ex))
.
Equally here:
and here:
Here is the test code:
template <typename... T, typename CompletionToken>
auto a(CompletionToken&& token)
{
return boost::asio::async_compose<CompletionToken, void(std::exception_ptr, T...)>(
[](auto& op)
{
op.complete({}, T{}...);
},
token);
}
asio::spawn(
io_context,
[&](auto&& yield)
{
a(yield);
a<int>(yield);
a<int, int>(yield);
},
[](auto eptr)
{
CHECK_FALSE(eptr);
});
While the code compiles now (Boost 1.84) the CHECK_FALSE is still triggered.
Compilation error occurs here https://github.com/chriskohlhoff/asio/blob/1f8d154829b902dbc45a651587c6c6df948358e8/asio/include/asio/impl/spawn.hpp#L692-L692 Due to missing
*
here https://github.com/chriskohlhoff/asio/blob/1f8d154829b902dbc45a651587c6c6df948358e8/asio/include/asio/impl/spawn.hpp#L672