Skip to content

Conversation

strega-nil-ms
Copy link
Contributor

@strega-nil-ms strega-nil-ms commented Aug 3, 2022

additionally:

  • add _Unwrapped() && noexcept to path::iterator
  • add _Unwrapped() && to reverse_iterator
  • add conditional noexcepts to:
    • counted_iterator
    • take_view::_Sentinel
    • take_while_view::_Sentinel
    • move_iterator

Fixes #2989

Requires testing

additionally, add conditional noexcepts to a lot of `_Unwrapped()`s
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Aug 3, 2022
@CaseyCarter
Copy link
Contributor

CaseyCarter commented Aug 3, 2022

I want to say that path::iterator::_Unwrapped should be rvalue-qualified and noexcept, which is consistent with the design to support unwrapping move-only input iterators, but then they couldn't be sentinels. Sentinels and forward iterators must support non-modifying lvalue unwrap. (As if I needed another reason to hate path::iterator.)

We should consider adding a _Unwrapped() && noexcept for perf.

@strega-nil-ms strega-nil-ms marked this pull request as ready for review August 5, 2022 18:49
@strega-nil-ms strega-nil-ms requested a review from a team as a code owner August 5, 2022 18:49
plus, fix reverse_iterator up with an `_Unwrapped() &&`
strega-nil-ms pushed a commit to miscco/STL that referenced this pull request Aug 12, 2022
@StephanTLavavej StephanTLavavej self-assigned this Aug 16, 2022
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej merged commit ebbc990 into microsoft:main Aug 16, 2022
@StephanTLavavej
Copy link
Member

Thanks for this PR - let's call it a wrap! 😹 🎁 🎥

@strega-nil-ms strega-nil-ms deleted the is_nothrow_unwrapped 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
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_Get_unwrapped et. al. should (almost) always be noexcept
4 participants