Fixed default template parameters for value_or/operator= in pfn::expected#236
Merged
Conversation
Assisted-by: Claude:claude-opus-4-8
The [expected.object.general] synopsis defaults these to remove_cv_t<T>:
value_or had no default, operator=(U&&) defaulted to T. The test guards
both value_or overloads via a non-deducible {} argument; operator='s
default is unobservable (T vs remove_cv_t<T> differ only for cv T, where
the assignment is constrained away).
Assisted-by: Claude:claude-opus-4-8
🤖 Augment PR SummarySummary: Makes Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The validation TU recompiles expected.cpp against std::expected. The
value_or({}) probe needs the synopsis `= remove_cv_t<T>` default, which
libstdc++ added in GCC 15 and libc++ in LLVM 22 -- gate it on those.
Also cover operator=(U&&)'s default: an immovable E drops the copy/move
assignment overloads from expected, so e={} is well-formed only via the
value assignment's defaulted U. std has always had this default, so it
needs no gate.
Assisted-by: Claude:claude-opus-4-8
Assisted-by: Claude:claude-opus-4-8
|
Member
Author
|
augment review |
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.



No description provided.