Repository navigation
Conversation
`transform_sender` transforms a sender repeatedly, until a domain's transformation returns a sender of the same type, and its `noexcept` is meant to be the conjunction of the steps'. The step that ends the recursion reports only its own `noexcept`, though, dropping the earlier steps'. So when a potentially-throwing transformation returns a sender that's then transformed again, for example by `default_domain`'s identity transformation, `transform_sender`, and with it `connect`, claim not to throw, and an exception thrown by the transformation calls `std::terminate`. This diff makes the last step report the conjunction too. That exposes a missing `noexcept` on `sequence`'s lowering, whose `transform_sender` had no exception specification, so connecting a `sequence`, or a `repeat_n`, which connects one, became potentially-throwing. It's now `noexcept` exactly when moving or copying the children into the lowered sender is. The new tests check that a potentially-throwing transformation whose result is transformed again makes `transform_sender` and `connect` potentially-throwing, that its exception propagates out of `connect`, and when lowering a `sequence` is `noexcept`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ispeters
force-pushed
the
fix-transform-sender-noexcept
branch
from
October 28, 2026 18:28
1331d42 to
3999de6
Compare
This branch has not been deployed
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.
transform_sendertransforms a sender repeatedly, until a domain's transformation returns a sender of the same type, and itsnoexceptis meant to be the conjunction of the steps'. The step that ends the recursion reports only its ownnoexcept, though, dropping the earlier steps'. So when a potentially-throwing transformation returns a sender that's then transformed again, for example bydefault_domain's identity transformation,transform_sender, and with itconnect, claim not to throw, and an exception thrown by the transformation callsstd::terminate.This diff makes the last step report the conjunction too.
That exposes a missing
noexceptonsequence's lowering, whosetransform_senderhad no exception specification, so connecting asequence, or arepeat_n, which connects one, became potentially-throwing. It's nownoexceptexactly when moving or copying the children into the lowered sender is.The new tests check that a potentially-throwing transformation whose result is transformed again makes
transform_senderandconnectpotentially-throwing, that its exception propagates out ofconnect, and when lowering asequenceisnoexcept.