- Notifications
You must be signed in to change notification settings - Fork215
Open
Description
Hello,
I encountered an issue when compiling the following code with gcc (version 14.2) using the latest stdexec commit (ac2d378).
The code defines a very simple sender algorithm that forwards another sender by wrapping it and then returns a new sender that should behave identically.
Here is a minimal reproducible example:
structsimply_forward_t {template<typename S>structsender {using sender_concept = stdexec::sender_t; S s;template<typename Env>constexprautoget_completion_signatures(Env &&)constnoexcept -> stdexec::completion_signatures_of_t<S, Env> {return {}; }template<typename Receiver> stdexec::operation_stateautoconnect(Receiver &&r) && {returnstdexec::connect(std::move(s),static_cast<Receiver &&>(r)); } };template<stdexec::sender S> stdexec::senderautooperator()(S &&s)const {return sender<std::remove_cvref_t<S>>{std::forward<S>(s)}; }}inlineconstexpr simply_forward;exec::task<void>g() {co_return; }exec::task<void>f() {co_awaitsimply_forward(g() |stdexec::let_error([](auto) {returnstdexec::just(); }) |stdexec::let_stopped([] {returnstdexec::just(); }));};
The compilation fails with gcc-14.2.
The error message is quite long, so I have attached it as a separate file for your reference.
For comparison, the same code compiles successfully with clang-17 and clang-20.
My question is:
Is there something wrong with thesimply_forward_t implementation, or could this be a gcc-specific issue?
Any insights or advice would be greatly appreciated.
Thank you.