Skip to content

Implement LWG-3520 - #2200

Merged
Stephan T. Lavavej (StephanTLavavej) merged 7 commits into
microsoft:mainfrom
fsb4000:fix2180
Sep 25, 2021
Merged

Implement LWG-3520#2200
Stephan T. Lavavej (StephanTLavavej) merged 7 commits into
microsoft:mainfrom
fsb4000:fix2180

Conversation

@fsb4000

Copy link
Copy Markdown
Contributor

Fixes #2180

@fsb4000
Igor Zhukov (fsb4000) marked this pull request as ready for review September 12, 2021 06:56
@fsb4000
Igor Zhukov (fsb4000) requested a review from a team as a code owner September 12, 2021 06:56
@fsb4000 Igor Zhukov (fsb4000) changed the title Implemente LWG-3520 Implement LWG-3520 Sep 12, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good.

To ensure that we indeed cannot do this, it would be great if you would add a concept ``CanIterSwap` to range_algorithm_support.h like

template <class I>
concept CanIterSwap = requires(I&& i1, I&& i2) {
    ranges::iter_swap(std::forward<I>(i1), std::forward<I>(i2));
};

and verify that it is not fulfilled

Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@googlemail.com>
Comment thread tests/std/tests/P0896R4_views_transform/test.cpp Outdated
Co-authored-by: Adam Bucior <35536269+AdamBucior@users.noreply.github.com>
@CaseyCarter Casey Carter (CaseyCarter) added the LWG Library Working Group issue label Sep 13, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks! I'll push a comment change.

Comment thread tests/std/tests/P0896R4_views_transform/test.cpp Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to an MSVC-internal PR. Please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit ec46d76 into microsoft:main Sep 25, 2021
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for implementing and testing this LWG issue resolution, one step closer to 100% conformance! 💯 😸 ✔️

@fsb4000
Igor Zhukov (fsb4000) deleted the fix2180 branch September 25, 2021 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LWG Library Working Group issue ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LWG-3520 iter_move and iter_swap are inconsistent for transform_view::iterator

5 participants