Skip to content

Add unwrapping to move_sentinel#3098

Merged
StephanTLavavej merged 4 commits into
microsoft:mainfrom
strega-nil:unwrap-move_sentinel
Sep 13, 2022
Merged

Add unwrapping to move_sentinel#3098
StephanTLavavej merged 4 commits into
microsoft:mainfrom
strega-nil:unwrap-move_sentinel

Conversation

@strega-nil-ms
Copy link
Copy Markdown
Contributor

fixes #3009

There are two new concepts - _Weakly_unwrappable_sentinel and _Weakly_unwrappable_iterator - these are useful for implementation of wrapper types which are unwrappable when their underlying type is unwrappable (like move_iterator/move_sentinel)

@strega-nil-ms strega-nil-ms requested a review from a team as a code owner September 12, 2022 17:08
@strega-nil-ms strega-nil-ms added enhancement Something can be improved performance Must go faster ranges C++20/23 ranges labels Sep 12, 2022
@StephanTLavavej StephanTLavavej removed the enhancement Something can be improved label Sep 12, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member

Adjusting labels - we usually use enhancement only when no more specific label like performance applies.

Copy link
Copy Markdown
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good, all I found were 3 tiny nitpicks, and IIRC you also prefer brace construction when possible, so I'll validate and push changes to save time. (I'd request changes if I were less sure you'd prefer them.)

Comment thread stl/inc/iterator Outdated
Comment thread stl/inc/iterator Outdated
@StephanTLavavej StephanTLavavej self-assigned this Sep 12, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit ac129e5 into microsoft:main Sep 13, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member

Thanks for this ranges performance improvement! 🚀 🎉 😻 🎁

CaseyCarter pushed a commit to CaseyCarter/STL that referenced this pull request Oct 6, 2022
Co-authored-by: Nicole Mazzuca <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
@strega-nil-ms strega-nil-ms deleted the unwrap-move_sentinel branch December 19, 2022 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Must go faster ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<iterator>: move_sentinel could be unwrappable

4 participants