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 views::empty and views::single range factories #1201

Merged
merged 9 commits into from
Aug 26, 2020

Conversation

CaseyCarter
Copy link
Member

Partially addresses #39.

@CaseyCarter CaseyCarter added cxx20 C++20 feature ranges C++20/23 ranges labels Aug 17, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner August 17, 2020 15:02
@CaseyCarter CaseyCarter mentioned this pull request Aug 17, 2020
stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Outdated Show resolved Hide resolved
// clang-format on

_Semiregular_box& operator=(const _Semiregular_box& _That) noexcept(is_nothrow_copy_constructible_v<_Ty>&&
is_nothrow_copy_assignable_v<_Ty>) /* strengthened */ requires copyable<_Ty> {
Copy link
Contributor

Choose a reason for hiding this comment

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

That requires Claude here is quite hidden. I understand the pain of clang Format thought.

No change requested.

Copy link
Member Author

Choose a reason for hiding this comment

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

How is the requires-clause hidden in comparison to any other property of the function declaration that appears on these two lines?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it is just that we do not have many trailing requires clauses until recently.

So its more that we treat them differently that template constraints which come in a newline with an additional level of identation

stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
tests/std/tests/P0896R4_views_empty/test.cpp Show resolved Hide resolved
tests/std/tests/P0896R4_views_single/test.cpp Show resolved Hide resolved
@StephanTLavavej StephanTLavavej removed their assignment Aug 20, 2020
@StephanTLavavej
Copy link
Member

@CaseyCarter This needs to be merged with recent commits.

stl/inc/ranges Show resolved Hide resolved
@StephanTLavavej StephanTLavavej self-assigned this Aug 26, 2020
@StephanTLavavej StephanTLavavej merged commit 7b0167c into microsoft:master Aug 26, 2020
@StephanTLavavej
Copy link
Member

Thanks for completing yet another piece of the Ranges puzzle, and finding novel compiler bugs for the FE devs to fix! 😹

@CaseyCarter CaseyCarter deleted the empty_single branch August 26, 2020 15:04
@CaseyCarter
Copy link
Member Author

Thanks for completing yet another piece of the Ranges puzzle, and finding novel compiler bugs for the FE devs to fix! 😹

It's important to keep the compiler from overheating by ICEing it frequently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx20 C++20 feature ranges C++20/23 ranges
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants