Skip to content

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Jun 6, 2025

Fixes #5555.

Also

  • makes the error message for direct misuse of ranges::iter_move more detailed by saying _Must_have_ADL_found_iter_move_or_be_dereferenceable; and
  • move the workaround for VSO-1008447 to the product code as we compute the return type ourselves anyway.

Unblocks libcxx tests:

  • std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_rvalue_reference_t.compile.pass.cpp
  • std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_spaceship.pass.cpp
  • std/containers/views/views.span/span.cons/copy.pass.cpp

All of them rely on less eager instantiation in ranges::iter_move.

Conflict with #5560 will be resolved later has been resolved.

@AlexGuteniev
Copy link
Contributor

It may be useful to mention LWG-4270 in the description, as it is not clickable from the title

@StephanTLavavej StephanTLavavej added enhancement Something can be improved ranges C++20/23 ranges labels Jun 8, 2025
@StephanTLavavej StephanTLavavej self-assigned this Jun 8, 2025
@StephanTLavavej
Copy link
Member

Thanks! 😻 I pushed a conflict-free merge with main, followed by guarding the workaround for MSVC. Please double-check.

@StephanTLavavej StephanTLavavej removed their assignment Jul 23, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Jul 23, 2025
@StephanTLavavej
Copy link
Member

I pushed a merge with main to resolve a conflict with #5661. This PR's change to P0896R4_ranges_iterator_machinery is retained but simpler now.

@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Aug 7, 2025
@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 72d8110 into microsoft:main Aug 8, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Aug 8, 2025
@StephanTLavavej
Copy link
Member

Thanks for fixing this squirrelly projected behavior! 🐿️ 🛠️ 🪄

@frederick-vs-ja frederick-vs-ja deleted the lwg-4270 branch August 8, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved ranges C++20/23 ranges
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

<xutility>: Usage of decltype(auto) in the operator() of ranges::iter_move's type seems buggy
3 participants