Repository navigation
Add tuple protocol support for singular copacks - #435
Merged
Merged
Conversation
Provide tuple_size, tuple_element and ADL get<0> for copack<T>. Structured bindings now expose the alternative rather than the public storage members. Empty and wider copacks remain excluded. Preserve const qualification and value category in get, and reject volatile copacks through constraints. A pack alternative remains one tuple element; fn::apply still expands its fields. Cover tuple traits, reference access, structured bindings, choice payload mutation and apply dispatch. Assisted-by: Claude:claude-opus-5-5
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🤖 Augment PR SummarySummary: This PR makes singular
🤖 Was this summary useful? React with 👍 or 👎 |
|
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.



A
copackwith exactly one alternative now supports structured bindings through tuple traits and ADLget<0>. Bindings expose the alternative instead of the publicdataandindexmembers, including when accessing a singular choice's payload throughvalue(). The protocol is limited to singular copacks. Bothgetoverloads reject volatile copacks through constraints, avoiding the previous hard error when probing index-less access.Closes #416