-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
This code compiles good:
auto loop = beman::execution::run_loop();
auto task = beman::execution::schedule(loop.get_scheduler())
| beman::execution::let_value([]
{
return beman::execution::read_env(beman::execution::get_scheduler)
| beman::execution::then([] (auto&& sched)
{
static_assert(std::same_as<decltype(sched), decltype(beman::execution::run_loop().get_scheduler())>);
/* we need the scheduler here to do sth, e.g.
* static_assert the sheduler supports io_uring, then
* launch an io_uring task and submit the callback on
* io_uring_scheduler.get_ring()... etc
*/
});
});But the below one fails to compile (Linux, g++15.2, clang++20.1.8):
auto loop = beman::execution::run_loop();
auto task = beman::execution::schedule(loop.get_scheduler())
| beman::execution::let_value([]
{
auto sched_sender = beman::execution::read_env(beman::execution::get_scheduler);
auto value_sender = beman::execution::just(42);
return beman:execution::when_all(std::move(sched_sender), std::move(value_sender)) // <-- use a when_all here
| beman::execution::then([] (auto&& sched, int value) { /*io_uring_socket.async_send(value, on=sched)...*/ });
});With gcc outputs:
[anonymous@matebook project]$ g++ -std=c++26 -Iinclude main.cpp -o main
In file included from include/beman/execution/execution.hpp:48,
from main.cpp:1:
include/beman/execution/detail/read_env.hpp: In instantiation of 'struct beman::execution::detail::completion_signatures_for_impl<beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, beman::execution::empty_env&>':
include/beman/execution/detail/completion_signatures_for.hpp:39:7: required by substitution of 'template<class Sender, class Env> using beman::execution::detail::completion_signatures_for = std::conditional_t<same_as<beman::execution::detail::no_completion_signatures_defined_in_sender, typename beman::execution::detail::completion_signatures_for_impl<Sender, Env>::type>, typename beman::execution::detail::completion_signatures_for_impl<typename std::remove_cvref<_Tp>::type, Env>::type, typename beman::execution::detail::completion_signatures_for_impl<Sender, Env>::type> [with Sender = const beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env&]'
39 | using completion_signatures_for = ::std::conditional_t<
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/basic_sender.hpp:93:10: required by substitution of 'template<class Env> beman::execution::detail::completion_signatures_for<const beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, Env> beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>::get_completion_signatures(Env&&) const & [with Env = beman::execution::empty_env&]'
93 | auto get_completion_signatures(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/get_completion_signatures.hpp:33:83: required from 'static auto beman::execution::get_completion_signatures_t::get(Sender&&, Env&&) [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env]'
33 | if constexpr (requires { new_sender(sender, env).get_completion_signatures(env); })
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
include/beman/execution/detail/get_completion_signatures.hpp:57:75: required by substitution of 'template<class Sender, class Env> requires !(same_as<void, decltype(beman::execution::get_completion_signatures_t::get((declval<Sender>)(), (declval<Env>)()))>) auto beman::execution::get_completion_signatures_t::operator()(Sender&&, Env&&) const [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env]'
57 | decltype(get_completion_signatures_t::get(::std::declval<Sender>(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
58 | ::std::declval<Env>()))>)
| ~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/sender_in.hpp:21:58: required by substitution of 'template<class Sender, class Env, template<class ...> class Tuple, template<class ...> class Variant> requires sender_in<Sender, Env> using beman::execution::value_types_of_t = beman::execution::detail::gather_signatures<beman::execution::set_value_t, beman::execution::completion_signatures_of_t<Sender, Env>, Tuple, Variant> [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env; Tuple = std::tuple; Variant = beman::execution::detail::type_list]'
21 | ::beman::execution::get_completion_signatures(::std::forward<Sender>(sender), ::std::forward<Env>(env))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/when_all.hpp:54:53: required by substitution of 'template<class ... Sender> requires ((... && sender<Sender>)) && (0 != sizeof ... (Sender ...) && (((size_v<typename beman::execution::detail::gather_signatures_helper<typename beman::execution::detail::meta::detail::filter_tag<beman::execution::detail::same_tag, beman::execution::set_value_t, decltype((declval()())((declval<Sender>)(), declval()()))>::type, std::tuple, beman::execution::detail::type_list>::type>) == 1 && ...)) && requires('type_pack_expansion' not supported by simple_type_specifier... s'type_pack_expansion' not supported by direct_abstract_declarator) {typename std::common_type<decltype(beman::execution::detail::get_domain_early(s))...>::type;}) auto beman::execution::detail::when_all_t::operator()(Sender&& ...) const [with Sender = {beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, beman::execution::detail::basic_sender<beman::execution::detail::just_t<beman::execution::set_value_t>, beman::execution::detail::product_type<int> >}]'
54 | ((::beman::execution::detail::meta::size_v<
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
55 | ::beman::execution::value_types_of_t<Sender,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | ::beman::execution::empty_env,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | ::std::tuple,
| ~~~~~~~~~~~~~
58 | ::beman::execution::detail::type_list>> == 1u) &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:11:56: required from here
11 | return beman::execution::when_all(std::move(sched_sender), std::move(value_sender)) // <-- use a when_all here
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/read_env.hpp:43:73: error: no match for call to '(beman::execution::get_scheduler_t) (std::add_const_t<beman::execution::empty_env>&)'
43 | ::beman::execution::set_value_t(decltype(::std::declval<Query>()(::std::as_const(::std::declval<Env>()))));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/beman/execution/execution.hpp:16:
include/beman/execution/detail/get_scheduler.hpp:13:8: note: there is 1 candidate
13 | struct get_scheduler_t : ::beman::execution::forwarding_query_t {
| ^~~~~~~~~~~~~~~
include/beman/execution/detail/get_scheduler.hpp:16:10: note: candidate 1: 'template<class Env> requires requires(const beman::execution::get_scheduler_t& self, Env&& env) {std::as_const(env).query(self);} auto beman::execution::get_scheduler_t::operator()(Env&&) const'
16 | auto operator()(Env&& env) const noexcept {
| ^~~~~~~~
include/beman/execution/detail/get_scheduler.hpp:16:10: note: template argument deduction/substitution failed:
include/beman/execution/detail/get_scheduler.hpp:16:10: note: constraints not satisfied
include/beman/execution/detail/get_scheduler.hpp: In substitution of 'template<class Env> requires requires(const beman::execution::get_scheduler_t& self, Env&& env) {std::as_const(env).query(self);} auto beman::execution::get_scheduler_t::operator()(Env&&) const [with Env = const beman::execution::empty_env&]':
include/beman/execution/detail/read_env.hpp:43:73: required from 'struct beman::execution::detail::completion_signatures_for_impl<beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, beman::execution::empty_env&>'
43 | ::beman::execution::set_value_t(decltype(::std::declval<Query>()(::std::as_const(::std::declval<Env>()))));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/completion_signatures_for.hpp:39:7: required by substitution of 'template<class Sender, class Env> using beman::execution::detail::completion_signatures_for = std::conditional_t<same_as<beman::execution::detail::no_completion_signatures_defined_in_sender, typename beman::execution::detail::completion_signatures_for_impl<Sender, Env>::type>, typename beman::execution::detail::completion_signatures_for_impl<typename std::remove_cvref<_Tp>::type, Env>::type, typename beman::execution::detail::completion_signatures_for_impl<Sender, Env>::type> [with Sender = const beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env&]'
39 | using completion_signatures_for = ::std::conditional_t<
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/basic_sender.hpp:93:10: required by substitution of 'template<class Env> beman::execution::detail::completion_signatures_for<const beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, Env> beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>::get_completion_signatures(Env&&) const & [with Env = beman::execution::empty_env&]'
93 | auto get_completion_signatures(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/get_completion_signatures.hpp:33:83: required from 'static auto beman::execution::get_completion_signatures_t::get(Sender&&, Env&&) [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env]'
33 | if constexpr (requires { new_sender(sender, env).get_completion_signatures(env); })
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
include/beman/execution/detail/get_completion_signatures.hpp:57:75: required by substitution of 'template<class Sender, class Env> requires !(same_as<void, decltype(beman::execution::get_completion_signatures_t::get((declval<Sender>)(), (declval<Env>)()))>) auto beman::execution::get_completion_signatures_t::operator()(Sender&&, Env&&) const [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env]'
57 | decltype(get_completion_signatures_t::get(::std::declval<Sender>(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
58 | ::std::declval<Env>()))>)
| ~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/sender_in.hpp:21:58: required by substitution of 'template<class Sender, class Env, template<class ...> class Tuple, template<class ...> class Variant> requires sender_in<Sender, Env> using beman::execution::value_types_of_t = beman::execution::detail::gather_signatures<beman::execution::set_value_t, beman::execution::completion_signatures_of_t<Sender, Env>, Tuple, Variant> [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env; Tuple = std::tuple; Variant = beman::execution::detail::type_list]'
21 | ::beman::execution::get_completion_signatures(::std::forward<Sender>(sender), ::std::forward<Env>(env))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/when_all.hpp:54:53: required by substitution of 'template<class ... Sender> requires ((... && sender<Sender>)) && (0 != sizeof ... (Sender ...) && (((size_v<typename beman::execution::detail::gather_signatures_helper<typename beman::execution::detail::meta::detail::filter_tag<beman::execution::detail::same_tag, beman::execution::set_value_t, decltype((declval()())((declval<Sender>)(), declval()()))>::type, std::tuple, beman::execution::detail::type_list>::type>) == 1 && ...)) && requires('type_pack_expansion' not supported by simple_type_specifier... s'type_pack_expansion' not supported by direct_abstract_declarator) {typename std::common_type<decltype(beman::execution::detail::get_domain_early(s))...>::type;}) auto beman::execution::detail::when_all_t::operator()(Sender&& ...) const [with Sender = {beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, beman::execution::detail::basic_sender<beman::execution::detail::just_t<beman::execution::set_value_t>, beman::execution::detail::product_type<int> >}]'
54 | ((::beman::execution::detail::meta::size_v<
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
55 | ::beman::execution::value_types_of_t<Sender,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | ::beman::execution::empty_env,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | ::std::tuple,
| ~~~~~~~~~~~~~
58 | ::beman::execution::detail::type_list>> == 1u) &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:11:56: required from here
11 | return beman::execution::when_all(std::move(sched_sender), std::move(value_sender)) // <-- use a when_all here
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/get_scheduler.hpp:16:10: required by the constraints of 'template<class Env> requires requires(const beman::execution::get_scheduler_t& self, Env&& env) {std::as_const(env).query(self);} auto beman::execution::get_scheduler_t::operator()(Env&&) const'
include/beman/execution/detail/get_scheduler.hpp:15:18: in requirements with 'const beman::execution::get_scheduler_t& self', 'Env&& env' [with Env = const beman::execution::empty_env&]
include/beman/execution/detail/get_scheduler.hpp:15:95: note: the required expression 'std::as_const(env).query(self)' is invalid
15 | requires requires(const get_scheduler_t& self, Env&& env) { ::std::as_const(env).query(self); }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/beman/execution/detail/read_env.hpp: In instantiation of 'struct beman::execution::detail::completion_signatures_for_impl<beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, beman::execution::empty_env&>':
include/beman/execution/detail/completion_signatures_for.hpp:39:7: required by substitution of 'template<class Sender, class Env> using beman::execution::detail::completion_signatures_for = std::conditional_t<same_as<beman::execution::detail::no_completion_signatures_defined_in_sender, typename beman::execution::detail::completion_signatures_for_impl<Sender, Env>::type>, typename beman::execution::detail::completion_signatures_for_impl<typename std::remove_cvref<_Tp>::type, Env>::type, typename beman::execution::detail::completion_signatures_for_impl<Sender, Env>::type> [with Sender = const beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env&]'
39 | using completion_signatures_for = ::std::conditional_t<
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/basic_sender.hpp:93:10: required by substitution of 'template<class Env> beman::execution::detail::completion_signatures_for<const beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, Env> beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>::get_completion_signatures(Env&&) const & [with Env = beman::execution::empty_env&]'
93 | auto get_completion_signatures(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/get_completion_signatures.hpp:33:83: required from 'static auto beman::execution::get_completion_signatures_t::get(Sender&&, Env&&) [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env]'
33 | if constexpr (requires { new_sender(sender, env).get_completion_signatures(env); })
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
include/beman/execution/detail/get_completion_signatures.hpp:57:75: required by substitution of 'template<class Sender, class Env> requires !(same_as<void, decltype(beman::execution::get_completion_signatures_t::get((declval<Sender>)(), (declval<Env>)()))>) auto beman::execution::get_completion_signatures_t::operator()(Sender&&, Env&&) const [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env]'
57 | decltype(get_completion_signatures_t::get(::std::declval<Sender>(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
58 | ::std::declval<Env>()))>)
| ~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/sender_in.hpp:21:58: required by substitution of 'template<class Sender, class Env, template<class ...> class Tuple, template<class ...> class Variant> requires sender_in<Sender, Env> using beman::execution::value_types_of_t = beman::execution::detail::gather_signatures<beman::execution::set_value_t, beman::execution::completion_signatures_of_t<Sender, Env>, Tuple, Variant> [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env; Tuple = std::tuple; Variant = beman::execution::detail::type_list]'
21 | ::beman::execution::get_completion_signatures(::std::forward<Sender>(sender), ::std::forward<Env>(env))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/when_all.hpp:54:53: required by substitution of 'template<class ... Sender> requires ((... && sender<Sender>)) && (0 != sizeof ... (Sender ...) && (((size_v<typename beman::execution::detail::gather_signatures_helper<typename beman::execution::detail::meta::detail::filter_tag<beman::execution::detail::same_tag, beman::execution::set_value_t, decltype((declval()())((declval<Sender>)(), declval()()))>::type, std::tuple, beman::execution::detail::type_list>::type>) == 1 && ...)) && requires('type_pack_expansion' not supported by simple_type_specifier... s'type_pack_expansion' not supported by direct_abstract_declarator) {typename std::common_type<decltype(beman::execution::detail::get_domain_early(s))...>::type;}) auto beman::execution::detail::when_all_t::operator()(Sender&& ...) const [with Sender = {beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, beman::execution::detail::basic_sender<beman::execution::detail::just_t<beman::execution::set_value_t>, beman::execution::detail::product_type<int> >}]'
54 | ((::beman::execution::detail::meta::size_v<
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
55 | ::beman::execution::value_types_of_t<Sender,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | ::beman::execution::empty_env,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | ::std::tuple,
| ~~~~~~~~~~~~~
58 | ::beman::execution::detail::type_list>> == 1u) &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:11:56: required from here
11 | return beman::execution::when_all(std::move(sched_sender), std::move(value_sender)) // <-- use a when_all here
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
include/beman/execution/detail/read_env.hpp:45:81: error: no match for call to '(beman::execution::get_scheduler_t) (beman::execution::empty_env&)'
45 | using type = ::std::conditional_t<noexcept(::std::declval<Query>()(::std::declval<const Env&>())),
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/get_scheduler.hpp:13:8: note: there is 1 candidate
13 | struct get_scheduler_t : ::beman::execution::forwarding_query_t {
| ^~~~~~~~~~~~~~~
include/beman/execution/detail/get_scheduler.hpp:16:10: note: candidate 1: 'template<class Env> requires requires(const beman::execution::get_scheduler_t& self, Env&& env) {std::as_const(env).query(self);} auto beman::execution::get_scheduler_t::operator()(Env&&) const'
16 | auto operator()(Env&& env) const noexcept {
| ^~~~~~~~
include/beman/execution/detail/get_scheduler.hpp:16:10: note: template argument deduction/substitution failed:
include/beman/execution/detail/get_scheduler.hpp:16:10: note: constraints not satisfied
include/beman/execution/detail/get_scheduler.hpp: In substitution of 'template<class Env> requires requires(const beman::execution::get_scheduler_t& self, Env&& env) {std::as_const(env).query(self);} auto beman::execution::get_scheduler_t::operator()(Env&&) const [with Env = beman::execution::empty_env&]':
include/beman/execution/detail/read_env.hpp:45:81: required from 'struct beman::execution::detail::completion_signatures_for_impl<beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, beman::execution::empty_env&>'
45 | using type = ::std::conditional_t<noexcept(::std::declval<Query>()(::std::declval<const Env&>())),
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/completion_signatures_for.hpp:39:7: required by substitution of 'template<class Sender, class Env> using beman::execution::detail::completion_signatures_for = std::conditional_t<same_as<beman::execution::detail::no_completion_signatures_defined_in_sender, typename beman::execution::detail::completion_signatures_for_impl<Sender, Env>::type>, typename beman::execution::detail::completion_signatures_for_impl<typename std::remove_cvref<_Tp>::type, Env>::type, typename beman::execution::detail::completion_signatures_for_impl<Sender, Env>::type> [with Sender = const beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env&]'
39 | using completion_signatures_for = ::std::conditional_t<
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/basic_sender.hpp:93:10: required by substitution of 'template<class Env> beman::execution::detail::completion_signatures_for<const beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, Env> beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>::get_completion_signatures(Env&&) const & [with Env = beman::execution::empty_env&]'
93 | auto get_completion_signatures(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/get_completion_signatures.hpp:33:83: required from 'static auto beman::execution::get_completion_signatures_t::get(Sender&&, Env&&) [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env]'
33 | if constexpr (requires { new_sender(sender, env).get_completion_signatures(env); })
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
include/beman/execution/detail/get_completion_signatures.hpp:57:75: required by substitution of 'template<class Sender, class Env> requires !(same_as<void, decltype(beman::execution::get_completion_signatures_t::get((declval<Sender>)(), (declval<Env>)()))>) auto beman::execution::get_completion_signatures_t::operator()(Sender&&, Env&&) const [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env]'
57 | decltype(get_completion_signatures_t::get(::std::declval<Sender>(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
58 | ::std::declval<Env>()))>)
| ~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/sender_in.hpp:21:58: required by substitution of 'template<class Sender, class Env, template<class ...> class Tuple, template<class ...> class Variant> requires sender_in<Sender, Env> using beman::execution::value_types_of_t = beman::execution::detail::gather_signatures<beman::execution::set_value_t, beman::execution::completion_signatures_of_t<Sender, Env>, Tuple, Variant> [with Sender = beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>; Env = beman::execution::empty_env; Tuple = std::tuple; Variant = beman::execution::detail::type_list]'
21 | ::beman::execution::get_completion_signatures(::std::forward<Sender>(sender), ::std::forward<Env>(env))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/when_all.hpp:54:53: required by substitution of 'template<class ... Sender> requires ((... && sender<Sender>)) && (0 != sizeof ... (Sender ...) && (((size_v<typename beman::execution::detail::gather_signatures_helper<typename beman::execution::detail::meta::detail::filter_tag<beman::execution::detail::same_tag, beman::execution::set_value_t, decltype((declval()())((declval<Sender>)(), declval()()))>::type, std::tuple, beman::execution::detail::type_list>::type>) == 1 && ...)) && requires('type_pack_expansion' not supported by simple_type_specifier... s'type_pack_expansion' not supported by direct_abstract_declarator) {typename std::common_type<decltype(beman::execution::detail::get_domain_early(s))...>::type;}) auto beman::execution::detail::when_all_t::operator()(Sender&& ...) const [with Sender = {beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>, beman::execution::detail::basic_sender<beman::execution::detail::just_t<beman::execution::set_value_t>, beman::execution::detail::product_type<int> >}]'
54 | ((::beman::execution::detail::meta::size_v<
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
55 | ::beman::execution::value_types_of_t<Sender,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | ::beman::execution::empty_env,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | ::std::tuple,
| ~~~~~~~~~~~~~
58 | ::beman::execution::detail::type_list>> == 1u) &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:11:56: required from here
11 | return beman::execution::when_all(std::move(sched_sender), std::move(value_sender)) // <-- use a when_all here
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/beman/execution/detail/get_scheduler.hpp:16:10: required by the constraints of 'template<class Env> requires requires(const beman::execution::get_scheduler_t& self, Env&& env) {std::as_const(env).query(self);} auto beman::execution::get_scheduler_t::operator()(Env&&) const'
include/beman/execution/detail/get_scheduler.hpp:15:18: in requirements with 'const beman::execution::get_scheduler_t& self', 'Env&& env' [with Env = beman::execution::empty_env&]
include/beman/execution/detail/get_scheduler.hpp:15:95: note: the required expression 'std::as_const(env).query(self)' is invalid
15 | requires requires(const get_scheduler_t& self, Env&& env) { ::std::as_const(env).query(self); }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
main.cpp: In lambda function:
main.cpp:11:56: error: no match for call to '(const beman::execution::detail::when_all_t) (std::remove_reference<beman::execution::detail::basic_sender<beman::execution::detail::read_env_t, beman::execution::get_scheduler_t>&>::type, std::remove_reference<beman::execution::detail::basic_sender<beman::execution::detail::just_t<beman::execution::set_value_t>, beman::execution::detail::product_type<int> >&>::type)'
11 | return beman::execution::when_all(std::move(sched_sender), std::move(value_sender)) // <-- use a when_all here
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/beman/execution/execution.hpp:53:
include/beman/execution/detail/when_all.hpp:51:8: note: there is 1 candidate
51 | struct when_all_t {
| ^~~~~~~~~~
include/beman/execution/detail/when_all.hpp:63:10: note: candidate 1: 'template<class ... Sender> requires ((... && sender<Sender>)) && (0 != sizeof ... (Sender ...) && (((size_v<typename beman::execution::detail::gather_signatures_helper<typename beman::execution::detail::meta::detail::filter_tag<beman::execution::detail::same_tag, beman::execution::set_value_t, decltype((declval()())((declval<Sender>)(), declval()()))>::type, std::tuple, beman::execution::detail::type_list>::type>) == 1 && ...)) && requires('type_pack_expansion' not supported by simple_type_specifier... s'type_pack_expansion' not supported by direct_abstract_declarator) {typename std::common_type<decltype(beman::execution::detail::get_domain_early(s))...>::type;}) auto beman::execution::detail::when_all_t::operator()(Sender&& ...) const'
63 | auto operator()(Sender&&... sender) const {
| ^~~~~~~~
include/beman/execution/detail/when_all.hpp:63:10: note: substitution of deduced template arguments resulted in errors seen above
In user's perspective this should be accepted (as when_all only composes two "outputs" together). Meanwhile, both codes are accepted when using stdexec. I'm not an expert on std::execution, but I hope someone will find out which is right :)
Thank you! (This is a super-tidy library, i love it.)
Metadata
Metadata
Assignees
Labels
No labels