Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates sender detection and completion-signature computation to address failures when an algorithm needs to account for (receiver) environment types.
Changes:
- Add an explicit
is_basic_sender_tagmarker tobasic_senderand relevant test senders. - Restrict
get_sender_data()decomposition to senders opted-in viais_basic_sender_tag. - Fix
store_receiver_t::sender::get_completion_signatures()to compute signatures based onTrans(sndr, env...)and remove the unused runtime env parameter list.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/beman/execution/exec-snd-transform.test.cpp | Opt-in test sender to “basic sender” decomposition via is_basic_sender_tag. |
| tests/beman/execution/exec-snd-expos.test.cpp | Opt-in multiple exposition test senders to “basic sender” decomposition via is_basic_sender_tag. |
| tests/beman/execution/exec-snd-concepts.test.cpp | Opt-in concept test senders/product senders to “basic sender” decomposition via is_basic_sender_tag. |
| tests/beman/execution/exec-domain-default.test.cpp | Opt-in domain-default test sender to “basic sender” decomposition via is_basic_sender_tag. |
| include/beman/execution/detail/store_receiver.hpp | Update completion-signature computation to incorporate environment arguments and decay Trans. |
| include/beman/execution/detail/sender_decompose.hpp | Gate decomposition on is_basic_sender_tag presence. |
| include/beman/execution/detail/basic_sender.hpp | Add is_basic_sender_tag marker to library basic_sender. |
Comments suppressed due to low confidence (1)
include/beman/execution/detail/store_receiver.hpp:96
store_receiver_t::sendernow decaysTransintotrans_tfor storage and completion-signature computation, butconnect()still instantiatesstate<Sndr, Trans, ...>andstate::state_tis computed fromTrans/Sndr(which may be reference-qualified). IfTrans(orSndr) has ref-qualified call/connect overloads, this can makestate_t(and thusop_state) a different type than what the constructor actually initializes, leading to hard compilation failures. Consider normalizing thestatetemplate parameters to the same decayed types actually stored/used at runtime (e.g.remove_cvref_t<Sndr>andtrans_t) and using those consistently instate_tandconnect().
using trans_t = ::std::remove_cvref_t<Trans>;
template <typename, typename... Env>
static consteval auto get_completion_signatures() noexcept {
return ::beman::execution::
get_completion_signatures<decltype(::std::declval<trans_t>()(::std::declval<Sndr>(), ::std::declval<Env>()...)), Env...>();
}
::std::remove_cvref_t<Sndr> sndr;
trans_t trans;
template <::beman::execution::receiver Receiver>
auto connect(Receiver&& r) && {
static_assert(::beman::execution::operation_state<state<Sndr, Trans, ::std::remove_cvref_t<Receiver>>>);
return state<Sndr, Trans, ::std::remove_cvref_t<Receiver>>(
::std::move(this->sndr), ::std::move(this->trans), ::std::forward<Receiver>(r));
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.