The following code results in a compilation error:
#include <beman/execution/execution.hpp>
namespace ex = beman::execution;
namespace {
struct non_decomposable_sender {
using sender_concept = ex::sender_t;
template <typename...>
static consteval auto get_completion_signatures() { return test_std::completion_signatures<ex::set_value_t()>(); }
non_decomposable_sender(int, int) {}
};
}
int main() {
(void)ex::get_completion_signatures<non_decomposible_sender, ex::env<>>();
}
Removing one of the int constructor parameters causes the code to compile!
The issue is that sender is used with ex::tag_of_t which tries to guess whether a type is decomposable. If it think it can decompose objects of a type it will extract a tag. However, the above type can't be decomposed.
Currently, I don't know how to properly fix the problem. The tentative plan is to rather detect if a sender is built using basic_sender (probably indirectly by actually detecting a nested type) and only try to decompose such senders.
The following code results in a compilation error:
Removing one of the
intconstructor parameters causes the code to compile!The issue is that sender is used with
ex::tag_of_twhich tries to guess whether a type is decomposable. If it think it can decompose objects of a type it will extract atag. However, the above type can't be decomposed.Currently, I don't know how to properly fix the problem. The tentative plan is to rather detect if a sender is built using
basic_sender(probably indirectly by actually detecting a nested type) and only try to decompose such senders.