Repository navigation
give every algorithm's sender a pretty type name - #2602
Merged
Merged
Conversation
Some algorithms (`just`, `then`, `upon_*`) returned senders with a nested "pretty" type, like `then_t::__sender<F, S>`, while the rest returned `__facade::__sender<Tag, Data, Child...>` directly, so error messages and debugger output named the tag, the data, and the children in full. Give every algorithm in stdexec, exec, and nvexec a sender type of its own, derived from `__facade::__sender` and defined at namespace scope with a deduction guide: `stdexec::__then_sender<F, S>`, `exec::repeat_n_sender<S>`, `nvexec::_strm::then_sender<F, S>`, and so on. The nested `just_t::__sender`, `then_t::__sender`, etc. are renamed the same way. Only the names in `STDEXEC` are uglified. A specialization on `__facade::__sender<...>` does not match a derived type, so the places that took senders apart that way now go through `__facade::__facade_sender_t`: `ensure_started`'s "is already started" check, nvexec's `_is_stream_facade_sender_v`, and the facade's `__retag` lookup (which would otherwise have silently stopped seeing re-tagging domains' results). `on(sndr, sch, clsur)` gets `__on_closure_sender`, and `__on::__sndr` becomes `__on_sender`. Compile time, memory, and object size are unchanged (within ~1.5%) on clang and GCC 16 for 15 representative tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Summary
stdexec,exec, andnvexecnow returns a sender of its own named type, derived from__facade::__senderand defined at namespace scope with a deduction guide, instead of__facade::__sender<Tag, Data, Child...>directly. Error messages and debugger output now show__then_sender<F, S>,exec::repeat_n_sender<S>, and so on.just_t::__sender,then_t::__sender,upon_error_t::__sender, etc. are renamed to__just_sender,__then_sender, ... Only names inSTDEXECare uglified;execandnvexecnames have no leading underscores.__on::__sndrbecomes__on_sender, andon(sndr, sch, clsur)gets__on_closure_sender.__facade::__sender<...>does not match a derived type, so the places that took senders apart that way now go through__facade::__facade_sender_t:ensure_started's "already started" check, nvexec's_is_stream_facade_sender_v, and the facade's__retaglookup (which would otherwise have silently stopped recognizing re-tagging domains' results).MAINTAINERS.mddocuments the convention.Testing
_failcompile-failure tests, the asio tests, and the three that need libdispatch, taskflow, or windows.h.-g -O0, 15 representative tests, clang and GCC 16, best of 3) are within ~1.5% ofmain.🤖 Generated with Claude Code