Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some combination of operator&& in awaitable_operators.hpp fails to compile #1577

Open
kik opened this issue Dec 25, 2024 · 0 comments
Open

Comments

@kik
Copy link

kik commented Dec 25, 2024

asio::awaitable<int> a(), b();
asio::awaitable<void> c();

a() && b() && c() // failed!
c() && b() && a() // OK
a() && c() && b() // OK

error message is

In file included from <source>:2:
/opt/compiler-explorer/libs/boost_1_77_0/boost/asio/experimental/awaitable_operators.hpp: In instantiation of 'boost::asio::awaitable<std::tuple<T ..., std::monostate>, Executor> boost::asio::experimental::awaitable_operators::operator&&(boost::asio::awaitable<std::tuple<_UTypes ...>, Executor>, boost::asio::awaitable<void, AwaitableExecutor>) [with T = {int, int}; Executor = boost::asio::any_io_executor]':
<source>:14:31:   required from here
   14 |     co_await (a() && b() && c());
      |                               ^
/opt/compiler-explorer/libs/boost_1_77_0/boost/asio/experimental/awaitable_operators.hpp:198:8: error: 5 names provided for structured binding
  198 |   auto [order, ex0, r0, ex1, r1] =
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/boost_1_77_0/boost/asio/experimental/awaitable_operators.hpp:198:8: note: while 'std::tuple<std::array<long unsigned int, 2>, std::__exception_ptr::exception_ptr, std::tuple<int, int>, std::__exception_ptr::exception_ptr>' decomposes into 4 elements
Compiler returned: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant