Allow void-returning callbacks in transform over a copack - #440
Merged
Merged
Conversation
🤖 Augment PR SummarySummary: This PR enables Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
Bronek
added this pull request to stack #445
September 28, 2026 20:14
Bronek
force-pushed
the
bronek/fix_void_transform_grading
branch
from
September 28, 2026 20:38
5e5ffac to
145adda
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Member
Author
|
augment review |
Bronek
force-pushed
the
bronek/fix_void_and_then_grading
branch
from
September 29, 2026 21:12
0f78acb to
58635ef
Compare
Bronek
removed this pull request from stack #445
September 29, 2026 21:20
Bronek
added this pull request to stack #446
September 29, 2026 21:21
Bronek
removed this pull request from stack #446
September 29, 2026 21:24
Bronek
changed the base branch from
bronek/fix_void_and_then_grading
to
main
September 29, 2026 21:24
Represent void callback results as pack<> in the result copack, including transform_error over a copack error. Add copack_value() for expected<void, E>. Convert results before spliced arguments expire and include the selected overload's explicit conversion in noexcept. Mutable operands can now select a void overload where they previously fell back to a valued const overload. Assisted-by: Claude:claude-opus-5-5 Assisted-by: Codex:gpt-6-astra
Store rvalue operands by value when the apply fold constructs a pack, matching as_pack. This avoids forming the forbidden pack<T&&>, which prevented transforming an rvalue copack with a following pack argument. It also fixes MSVC's failure when checking the const&& transform overload for an lvalue call. Assisted-by: Claude:claude-opus-5-5 Assisted-by: Codex:gpt-6-astra
Bronek
force-pushed
the
bronek/fix_void_transform_grading
branch
from
September 29, 2026 21:30
c0abe37 to
1ffad00
Compare
|
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.



Allow
voidcallbacks in copacktransform, representing their results aspack<>. All-voidcallbacks yieldcopack<pack<>>. This also applies through carriers and totransform_errorover a copack error.Add
expected<void, E>::copack_value(). Convert callback results before spliced arguments expire, and include explicit result conversions innoexcept.Mutable operands can select a
voidoverload where they previously fell back to a valuedconstoverload. At this point in the stack, void transforms require<fn/pack.hpp>as well as<fn/copack.hpp>.Assisted-by: Claude:claude-opus-5-5
Assisted-by: Codex:gpt-6-astra