[libc++][ranges] implement `std::views::elements_view`
authorHui Xie <hui.xie1990@gmail.com>
Fri, 4 Nov 2022 11:53:38 +0000 (11:53 +0000)
committerHui <hui.xie0621@gmail.com>
Sun, 15 Jan 2023 17:36:10 +0000 (17:36 +0000)
commit94461822c75d5080bf648f86552f7a59b76905c9
tree49e8fa3b08733c93f58caa21f3758e52c0b3160f
parent18b72494d345ccbdef4ba21e03749e87ec5dd7c3
[libc++][ranges] implement `std::views::elements_view`

`subrange` is also a `tuple-like`. To avoid the add entire `subrange` dependencies to `tuple-like`, we need forward declaration of `subrange`. However, the class template constraints of `subrange` currently requires `__iterator/concepts.h`, which requires `<concepts>`. The problem is that currently `tuple-like` is used in several different places, including libc++ extension for pair constructors. we don't want to add `<concepts>` to pair and other stuff. So this change also created several small headers that `subrange`'s declaration needed inside `__iterator/concepts/`

Differential Revision: https://reviews.llvm.org/D136268
49 files changed:
libcxx/docs/ReleaseNotes.rst
libcxx/docs/Status/Cxx20Issues.csv
libcxx/docs/Status/Cxx20Papers.csv
libcxx/docs/Status/Cxx2bIssues.csv
libcxx/docs/Status/SpaceshipProjects.csv
libcxx/include/CMakeLists.txt
libcxx/include/__fwd/get.h
libcxx/include/__fwd/subrange.h [new file with mode: 0644]
libcxx/include/__ranges/elements_view.h [new file with mode: 0644]
libcxx/include/__ranges/subrange.h
libcxx/include/__tuple_dir/pair_like.h [new file with mode: 0644]
libcxx/include/__tuple_dir/sfinae_helpers.h
libcxx/include/__tuple_dir/tuple_like.h
libcxx/include/__tuple_dir/tuple_like_ext.h [new file with mode: 0644]
libcxx/include/module.modulemap.in
libcxx/include/ranges
libcxx/include/tuple
libcxx/test/libcxx/private_headers.verify.cpp
libcxx/test/libcxx/ranges/range.adaptors/range.elements/elements_view.no_unique_address.compile.pass.cpp [new file with mode: 0644]
libcxx/test/libcxx/ranges/range.adaptors/range.elements/sentinel.no_unique_address.compile.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/adaptor.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/base.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/begin.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/borrowed.compile.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/ctor.default.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/ctor.view.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/end.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/general.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/arithmetic.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/base.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/compare.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.base.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.default.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.other.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/decrement.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/deref.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/increment.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/iterator/subscript.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/range.concept.compile.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/base.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/ctor.base.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/ctor.convert.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/ctor.default.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/equality.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/minus.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/size.pass.cpp [new file with mode: 0644]
libcxx/test/std/ranges/range.adaptors/range.elements/types.h [new file with mode: 0644]
llvm/utils/gn/secondary/libcxx/include/BUILD.gn