Make & take a void side as the unit factor pack<> - #441
Merged
Merged
Conversation
Bronek
added this pull request to stack #445
September 28, 2026 20:14
🤖 Augment PR SummarySummary: This PR redefines conjunction so a
.value() access now observes the added pack layer.
🤖 Was this summary useful? React with 👍 or 👎 |
Bronek
force-pushed
the
bronek/void_unit_factor
branch
from
September 28, 2026 20:38
e87b942 to
f77f41a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Bronek
force-pushed
the
bronek/void_unit_factor
branch
from
September 28, 2026 21:18
f77f41a to
82e058b
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
force-pushed
the
bronek/fix_void_transform_grading
branch
from
September 29, 2026 21:30
c0abe37 to
1ffad00
Compare
Bronek
force-pushed
the
bronek/void_unit_factor
branch
from
September 29, 2026 21:30
0a301b4 to
850ac60
Compare
Bronek
changed the base branch from
bronek/fix_void_transform_grading
to
main
September 29, 2026 21:31
Treat a void value as pack<> in conjunctions across carrier pairings. For example, expected<int, E> & just<void> now yields expected<pack<int>, E>. Two void values still yield void. Build pack::append results directly to avoid an extra relocation through a base subobject. Brace each aggregate layer so an element conversion cannot initialize the layer instead of the element. Assisted-by: Claude:claude-opus-5-5 Assisted-by: Codex:gpt-6-astra
The test routed each result through a conditional operator and asserted exact totals, so it also counted relocations the compiler may or may not elide; MSVC's differed. Results now bind to a reference. Lvalue operands keep the exact count (one copy, no move), which the `noexcept` specification relies on; rvalue operands assert only that nothing is copied. Assisted-by: Claude:claude-opus-5-5
…ion reached `optional & expected<T, copack<>>` with an engaged optional was checked by `static_assert` alone, and `pack::append`'s throwing relocations had no runtime test, so coverage saw neither. The runtime twins and a test that a throwing copy propagates out of `append` close both. Assisted-by: Claude:claude-opus-5-5
…time Assisted-by: Claude:claude-opus-5-5
Bronek
force-pushed
the
bronek/void_unit_factor
branch
from
September 29, 2026 21:32
850ac60 to
5299f38
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.



Treat a
voidvalue aspack<>in conjunctions across carrier pairings. For example,expected<int, E> & just<void>yieldsexpected<pack<int>, E>. Twovoidvalues still yieldvoid.Breaking: callers accessing
.value()receive a pack; callbacks still receive its unpacked elements.Build
pack::appendresults directly to avoid extra moves insidenoexceptcalls. Brace aggregate layers so element conversions cannot initialize a whole layer. Document thevoidrules inTYPE_ALGEBRA.md.Assisted-by: Claude:claude-opus-5-5
Assisted-by: Codex:gpt-6-astra