-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!rangesC++20/23 rangesC++20/23 ranges
Description
This is basically a sibling of #4102.
Lines 7614 to 7630 in 1c59a20
| template <bidirectional_iterator _It> | |
| void _Rotate_one_right(_It _First, _It _Mid, _It _Last) { | |
| // exchanges the range [_First, _Mid) with [_Mid, _Last) | |
| _STL_INTERNAL_CHECK(_RANGES next(_Mid) == _Last); | |
| auto _Temp = _RANGES iter_move(_Mid); | |
| _RANGES _Move_backward_common(_First, _STD move(_Mid), _STD move(_Last)); | |
| *_First = _STD move(_Temp); | |
| } | |
| template <bidirectional_iterator _It> | |
| void _Rotate_one_left(_It _First, _It _Mid, _It _Last) { | |
| // exchanges the range [_First, _Mid) with [_Mid, _Last) | |
| _STL_INTERNAL_CHECK(_RANGES next(_First) == _Mid); | |
| auto _Temp = _RANGES iter_move(_First); | |
| auto _Result = _RANGES _Move_unchecked(_STD move(_Mid), _STD move(_Last), _STD move(_First)); | |
| *_Result.out = _STD move(_Temp); | |
| } |
auto _Temp = _RANGES iter_move(_Mid) unexpectedly constructed remove_cvref_t<iter_reference_t<I>>.
Contrived testcase: https://godbolt.org/z/b7YqKPMej
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!rangesC++20/23 rangesC++20/23 ranges