Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

  • mergeable concept

  • algorithms: ranges::includes, ranges::set_union, ranges::set_intersection, ranges::set_difference, and ranges::set_symmetric_difference.

Partially addresses #39.

* `mergeable` concept

* algorithms: `ranges::includes`, `ranges::set_union`, `ranges::set_intersection`, `ranges::set_difference`, and `ranges::set_symmetric_difference`.
@CaseyCarter CaseyCarter added the cxx20 C++20 feature label Jul 14, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner July 14, 2020 19:00
@CaseyCarter CaseyCarter mentioned this pull request Jul 14, 2020
_Get_unwrapped(_STD move(_Last1)), _Get_unwrapped(_STD move(_First2)),
_Get_unwrapped(_STD move(_Last2)), _Get_unwrapped_unverified(_STD move(_Result)), _Pass_fn(_Pred),
_Pass_fn(_Proj1), _Pass_fn(_Proj2));
_Seek_wrapped(_First1, _STD move(_UResult.in1));
Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering whether this one would be helpful (If yes than it is future work. No change requested):

template<class _It1, class _It2, class _Out, class _UIt1, class _UIt2, class _UOut>
in_in_out_result<_It1, _It2, _Out> _Seek_wrapped(_It1& _In1, _It2& _In2, _UOut& _Out, in_in_out_result<_UIt1, _UIt2, _UOut>&& _UResult);

Same for in_out_result and in_in_result which occur often enough that it makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably so. I think we should add a work item to scan through the unwrapping and rewrapping to find opportunities for simplification after/in conjunction with the pass to unwrap result iterators with _Get_unwrapped_n.

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Looks good, very small suggestions.

@StephanTLavavej StephanTLavavej added the ranges C++20/23 ranges label Jul 15, 2020
@CaseyCarter CaseyCarter self-assigned this Jul 28, 2020
@CaseyCarter CaseyCarter merged commit 3659f3d into microsoft:master Jul 28, 2020
@CaseyCarter CaseyCarter deleted the setops branch July 28, 2020 22:26
@CaseyCarter
Copy link
Contributor Author

I'm having trouble coming up with a witty comment here... perhaps a limerick? What rhymes with set_symmetric_difference?

@CaseyCarter CaseyCarter removed their assignment Jul 28, 2020
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