Page MenuHomePhabricator

[libc++] [ranges] Implement views::take, views::drop, ranges::equal. [WIP, needs tests]
Needs ReviewPublic

Authored by Quuxplusone on Dec 5 2021, 12:06 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

This is just something I whipped up in order to get some example Ranges code compiling with Clang/libc++.
If someone wants to commandeer it to get the tests written faster, that's cool with me.
There are a total of 6 commits here: refactor, [alg.req], ranges::distance, view::take, view::drop, ranges::equal. https://github.com/Quuxplusone/llvm-project/compare/09208a38def076224e14b3202a1fd07cbebbbe8e...ranges-take

Diff Detail

Event Timeline

Quuxplusone created this revision.Dec 5 2021, 12:06 PM
Quuxplusone requested review of this revision.Dec 5 2021, 12:06 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptDec 5 2021, 12:06 PM
ldionne added a subscriber: ldionne.EditedDec 6 2021, 6:57 AM

I already have views::take, views::drop and views::join locally, with partial tests. I'll take a look at what you did and incorporate it in mine.

My bad for not publicizing that, I've been unable to resume work on those due to other stuff coming up.

philnik added inline comments.
libcxx/include/__algorithm/ranges_equal.h
88–90

What is the rationale behind this namespace? Is there some requirement?

libcxx/include/__ranges/counted.h
83

Nit: remove line

See D116950 for std::ranges::drop.