We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given:
template<::stdexec::receiver Receiver> struct receiver : Receiver { template<typename T> requires std::constructible_from<Receiver, T> explicit constexpr receiver(T&& t) noexcept( std::is_nothrow_constructible_v<Receiver, T>) : Receiver(std::forward<T>(t)) {} }; template<::stdexec::sender Sender> struct sender { using sender_concept = ::stdexec::sender_t; template<typename T> requires std::constructible_from<Sender, T> explicit constexpr sender(T&& t) noexcept( std::is_nothrow_constructible_v<Sender, T>) : sender_(std::forward<T>(t)) {} template<typename Self, typename Env> ::stdexec::completion_signatures_of_t< decltype(std::declval<Self>().sender_), Env> get_completion_signatures(this Self&&, const Env&); template<typename Self, typename Receiver> requires ::stdexec::sender_to< Sender, receiver<std::remove_cvref_t<Receiver>>> auto connect(this Self&& self, Receiver&& r) noexcept( noexcept( ::stdexec::connect( std::declval<Self>().sender_, receiver<std::remove_cvref_t<Receiver>>(std::declval<Receiver>())))) { return ::stdexec::connect( std::forward<Self>(self).sender_, receiver<std::remove_cvref_t<Receiver>>(std::forward<Receiver>(r))); } private: Sender sender_; }; template<typename T> explicit sender(T) -> sender<T>;
The following fails to compile (at least on GCC 14.1.0):
auto op = ::stdexec::connect( ::stdexec::just() | ::stdexec::let_value([]() { return sender( ::stdexec::just() | ::stdexec::then([]() noexcept { return 5; })); }), make_receiver([](auto&&...) noexcept {}));
Where the make_receiver invocation simply creates a receiver that accepts anything.
make_receiver
Internally the machinery seems to be confusing the derived type with the base type:
/scratch/mdx/src/../include/stdexec/__detail/__basic_sender.hpp:362:84: error: cannot convert ‘stdexec::__detail::__op_state<stdexec::__sexpr<<lambda closure object>stdexec::{anonymous}::<lambda()>(), stdexec::{anonymous}::__anon>, mdx::execution::tests::{anonymous}::receiver<stdexec::__any_::__receiver_ref<stdexec::completion_signatures<stdexec::__rcvrs::set_value_t(int)> > > >* const’ to ‘stdexec::__detail::__receiver<stdexec::__any_::__receiver_ref<stdexec::completion_signatures<stdexec::__rcvrs::set_value_t(int)> >, stdexec::__sexpr<<lambda closure object>stdexec::{anonymous}::<lambda()>(), stdexec::{anonymous}::__anon>, stdexec::__muchar (*)[1]>::__t::__parent_op_t*’ {aka ‘stdexec::__detail::__op_state<stdexec::__sexpr<<lambda closure object>stdexec::{anonymous}::<lambda()>(), stdexec::{anonymous}::__anon>, stdexec::__any_::__receiver_ref<stdexec::completion_signatures<stdexec::__rcvrs::set_value_t(int)> > >*’} in initialization 362 | return __tuple{connect(static_cast<_Child&&>(__child), __receiver_t<_Is>{__op_})...}; | ^~~~~ | | | stdexec::__detail::__op_state<stdexec::__sexpr<<lambda closure object>stdexec::{anonymous}::<lambda()>(), stdexec::{anonymous}::__anon>, mdx::execution::tests::{anonymous}::receiver<stdexec::__any_::__receiver_ref<stdexec::completion_signatures<stdexec::__rcvrs::set_value_t(int)> > > >* const
Full compilation output attached.
build.log
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given:
The following fails to compile (at least on GCC 14.1.0):
Where the
make_receiver
invocation simply creates a receiver that accepts anything.Internally the machinery seems to be confusing the derived type with the base type:
Full compilation output attached.
build.log
The text was updated successfully, but these errors were encountered: