Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rvalref #23

Merged
merged 3 commits into from
Jan 19, 2024
Merged

Fix rvalref #23

merged 3 commits into from
Jan 19, 2024

Conversation

steve-downey
Copy link
Owner

Move for the referred to object is independent of the value category of the optional. It shouldn't happen by default to avoid surprising steals.

Fix the overloads of value(), operator* and operator->() to return T& or T* and
not be dependent on the value category of the optional<T&>
Import tests and clean up implementation.
Update test suite.
Restrict functions to const and one instantiation that derefs value_
No rvalue returns or moves into provided functions based on category of
optional.
@steve-downey steve-downey merged commit 9bb97d0 into main Jan 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant