Skip to content

Implement P2441R2 views::join_with - #2619

Merged
Stephan T. Lavavej (StephanTLavavej) merged 15 commits into
microsoft:mainfrom
cpplearner:join_with
Jun 20, 2022
Merged

Implement P2441R2 views::join_with#2619
Stephan T. Lavavej (StephanTLavavej) merged 15 commits into
microsoft:mainfrom
cpplearner:join_with

Conversation

@cpplearner

Copy link
Copy Markdown
Contributor

This implements P2441R2 views::join_with.

Fixes #2538.

I need suggestions on test. This view depends on the category (input/forward/bidirectional), commonness, and element type of three ranges (outer, inner, pattern). Currently I simply copy the instantiation_test function from P0896R4_views_join, but it might be desirable to also test non-bidirectional_range or non-common_range patterns.

Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
S. B. Tam (cpplearner) and others added 2 commits March 29, 2022 00:51
Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added ranges C++20/23 ranges cxx23 C++23 feature labels Mar 28, 2022
Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
@StephanTLavavej

This comment was marked as resolved.

@cpplearner

This comment was marked as resolved.

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.

I have some question about the use of _Throw_bad_variant_access whether this is a valid use case here.

I would like to get some feedback on that

Comment thread stl/inc/iterator Outdated
Comment thread stl/inc/iterator Outdated
Comment thread stl/inc/iterator
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/iterator
Comment thread stl/inc/iterator
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread tests/std/tests/P2441R2_views_join_with/test.cpp Outdated
@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej

This comment was marked as resolved.

Comment thread tests/std/tests/P2441R2_views_join_with/test.cpp Outdated
Comment thread tests/std/tests/P2441R2_views_join_with/test.cpp Outdated
Comment thread stl/inc/ranges Outdated
@StephanTLavavej

This comment was marked as resolved.

Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
@StephanTLavavej

Copy link
Copy Markdown
Member

I've pushed a merge with main to resolve trivial adjacent-add conflicts in yvals_core.h and tests/std/test.lst.

@StephanTLavavej

Copy link
Copy Markdown
Member

I'm speculatively mirroring this to the MSVC-internal repo. Further changes can be pushed, but please notify me.

Comment thread stl/inc/iterator Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
@CaseyCarter Casey Carter (CaseyCarter) removed their assignment Jun 19, 2022
@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 34c9a73 into microsoft:main Jun 20, 2022
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for implementing this C++23 ranges feature! ✅ 😻 🎉

@cpplearner
S. B. Tam (cpplearner) deleted the join_with branch June 27, 2022 11:29
Igor Zhukov (fsb4000) pushed a commit to fsb4000/STL that referenced this pull request Aug 13, 2022
Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <Casey@Carter.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx23 C++23 feature ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P2441R2 views::join_with

4 participants