Partial implementation of C++20 of <ranges> header
authorJonathan Wakely <jwakely@redhat.com>
Thu, 31 Oct 2019 21:42:18 +0000 (21:42 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 31 Oct 2019 21:42:18 +0000 (21:42 +0000)
commit328b52d6751733f6e0f2d31feca44e1d8f2abfc6
treedf343cd7a1cd3846feea7c59d9679cfb0e96c126
parentd5a9005e641f25c0363c3998ed2fa9abc826a289
Partial implementation of C++20 of <ranges> header

* doc/doxygen/user.cfg.in: Add new header.
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/precompiled/stdc++.h: Include new header.
* include/std/ranges: New header.
(ranges::sentinel_t, ranges::range_value_t, ranges::range_reference_t)
(ranges::range_rvalue_reference_t, ranges::sized_range)
(ranges::output_range, ranges::input_ranges, ranges::forward_range)
(ranges::bidirectional_range, ranges::random_access_range)
(ranges::contiguous_range, ranges::common::range): Define.
* testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Check
that disabled_sized_sentinel can be specialized.
* testsuite/std/ranges/access/begin.cc: Include <ranges> instead of
<iterator>.
* testsuite/std/ranges/access/cbegin.cc: Likewise.
* testsuite/std/ranges/access/cdata.cc: Likewise.
* testsuite/std/ranges/access/cend.cc: Likewise.
* testsuite/std/ranges/access/crbegin.cc: Likewise.
* testsuite/std/ranges/access/crend.cc: Likewise.
* testsuite/std/ranges/access/data.cc: Likewise.
* testsuite/std/ranges/access/empty.cc: Likewise.
* testsuite/std/ranges/access/end.cc: Likewise.
* testsuite/std/ranges/access/end_neg.cc: Likewise.
* testsuite/std/ranges/access/rbegin.cc: Likewise.
* testsuite/std/ranges/access/rend.cc: Likewise.
* testsuite/std/ranges/access/size.cc: Likewise.
* testsuite/std/ranges/access/size_neg.cc: Likewise.
* testsuite/std/ranges/headers/ranges/synopsis.cc: New test.
* testsuite/std/ranges/range.cc: New test.
* testsuite/std/ranges/refinements.cc: New test.
* testsuite/std/ranges/sized.cc: New test.
* testsuite/util/testsuite_iterators.h: Add aliases for range types.
(output_iterator_wrapper::WritableObject::operator=): Add const
qualifier so that output_iterator_wrapper satisfies writable.

From-SVN: r277697
26 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/doc/doxygen/user.cfg.in
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/precompiled/stdc++.h
libstdc++-v3/include/std/ranges [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc
libstdc++-v3/testsuite/std/ranges/access/begin.cc
libstdc++-v3/testsuite/std/ranges/access/cbegin.cc
libstdc++-v3/testsuite/std/ranges/access/cdata.cc
libstdc++-v3/testsuite/std/ranges/access/cend.cc
libstdc++-v3/testsuite/std/ranges/access/crbegin.cc
libstdc++-v3/testsuite/std/ranges/access/crend.cc
libstdc++-v3/testsuite/std/ranges/access/data.cc
libstdc++-v3/testsuite/std/ranges/access/empty.cc
libstdc++-v3/testsuite/std/ranges/access/end.cc
libstdc++-v3/testsuite/std/ranges/access/end_neg.cc
libstdc++-v3/testsuite/std/ranges/access/rbegin.cc
libstdc++-v3/testsuite/std/ranges/access/rend.cc
libstdc++-v3/testsuite/std/ranges/access/size.cc
libstdc++-v3/testsuite/std/ranges/access/size_neg.cc
libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc [new file with mode: 0644]
libstdc++-v3/testsuite/std/ranges/range.cc [new file with mode: 0644]
libstdc++-v3/testsuite/std/ranges/refinements.cc [new file with mode: 0644]
libstdc++-v3/testsuite/std/ranges/sized.cc [new file with mode: 0644]
libstdc++-v3/testsuite/util/testsuite_iterators.h