Skip to content

Conversation

@steve-downey
Copy link
Member

Paper includes fix for an rvalue-ref optional<T&> being assigned to an optional and stealing via move the referred to object.

Fix the construction and assignment of optional<U&>&& to an optional<T> where
the referred to value could be stolen.
Improve the parallelism in t he declarations in the implementation to clarify
that the difference in the overloads is due to the 'Other' parameter for
removing it from consideration for overload since the U parameter is *already*
a reference. Checking for 'const U&' is no longer the right thing to check.
@coveralls
Copy link

coveralls commented Jan 18, 2025

Coverage Status

coverage: 93.333%. remained the same
when pulling d481100 on steve-downey:refsteal-paper
into b383b1a on bemanproject:main.

@neatudarius neatudarius self-assigned this Jan 20, 2025
Copy link
Member

@neatudarius neatudarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks for improving std/beman optional! ;)

The proposed changes are relative to the current working draft \cite{N4910}.

\chapter{Acknowledgements}
Many thanks to all of the reviewers and authors of beman/optional26, \cite{The_Beman_Project_beman_optional26}, in particular A. Jiang, Darius Neațu, David Sankel, Eddie Nolan, Jan Kokemüller, Jeff Garland, and River. Tomasz Kamiński provided extensive support for the library wording of optional<T\&>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Many thanks to all of the reviewers and authors of beman/optional26, \cite{The_Beman_Project_beman_optional26}, in particular A. Jiang, Darius Neațu, David Sankel, Eddie Nolan, Jan Kokemüller, Jeff Garland, and River. Tomasz Kamiński provided extensive support for the library wording of optional<T\&>.
Many thanks to all of the reviewers and authors of beman/optional, \cite{The_Beman_Project_beman_optional26}, in particular A. Jiang, Darius Neațu, David Sankel, Eddie Nolan, Jan Kokemüller, Jeff Garland, and River. Tomasz Kamiński provided extensive support for the library wording of optional<T\&>.

It's up to you if you want to postpone the renaming from #102 until Austria. If already planning to merge #102 first, reminder to update this branch.

And also, thanks for acknowledge here! :D

author = {The Beman Project},
license = {Apache-2.0},
title = {{beman.optional26}},
howpublished = {\url{https://github.com/bemanproject/optional26}},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reminder here about renaming. Feel free to ignore it. Just trying to help for Austria.

}

/// Converting move constructor.
/// Converting copy constructor for U&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please add some tests to cover this bugfix? Thanks for fixing it!

@steve-downey
Copy link
Member Author

steve-downey commented Jan 20, 2025 via email

@steve-downey steve-downey merged commit 8db85ce into bemanproject:main Jan 21, 2025
9 checks passed
@steve-downey steve-downey deleted the refsteal-paper branch May 30, 2025 22:32
@steve-downey steve-downey restored the refsteal-paper branch May 31, 2025 22:22
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.

3 participants