Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement LWG-3724: decay-copy should be constrained #2903

Merged
merged 5 commits into from
Jul 28, 2022

Conversation

frederick-vs-ja
Copy link
Contributor

Towards #2872.

Only one case in the operator() of _All_fn (the type of views::all) needs additional constraints. MSVC STL has already constrained it with constructible_from, but sometimes constructible_from seems still insufficient.

I'm not sure whether the difference between constructible_from and convertible_to is observable outside of IFNDR, or whether weird_string_view in the test file actually models view.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner July 24, 2022 15:13
@CaseyCarter CaseyCarter added LWG Library Working Group issue blocked Something is preventing work on this labels Jul 25, 2022
unsigned int size_ = 0u;

weird_string_view() = default;
explicit weird_string_view(const weird_string_view&) = default;
Copy link
Member

@CaseyCarter CaseyCarter Jul 25, 2022

Choose a reason for hiding this comment

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

copy_constructible requires implicit copy construction via convertible_to<const T&, T>, so this is a move-only view. (No change requested.)

stl/inc/ranges Show resolved Hide resolved
tests/std/tests/P0896R4_views_all/test.cpp Show resolved Hide resolved
@CaseyCarter CaseyCarter removed the blocked Something is preventing work on this label Jul 25, 2022
@CaseyCarter CaseyCarter added the ranges C++20/23 ranges label Jul 26, 2022
@StephanTLavavej StephanTLavavej self-assigned this Jul 27, 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 9aff8c5 into microsoft:main Jul 28, 2022
@StephanTLavavej
Copy link
Member

Thanks for implementing so many LWG issue resolutions and improving conformance! 😻 😻 😻 😻

@frederick-vs-ja frederick-vs-ja deleted the lwg-3724 branch July 28, 2022 03:37
fsb4000 pushed a commit to fsb4000/STL that referenced this pull request Aug 13, 2022
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.

3 participants