libstdc++: Add move_sentinel, common_iterator and counted_iterator
authorJonathan Wakely <jwakely@redhat.com>
Mon, 25 Nov 2019 19:02:03 +0000 (19:02 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 25 Nov 2019 19:02:03 +0000 (19:02 +0000)
commit7def9bd7cd9637ec31496febc217ca039de11746
treef17895c9f6ac7c20cb57016dfcf706c0cc70f8d0
parentd6039f5ce1b2110d458ededa6f8fa230927af772
libstdc++: Add move_sentinel, common_iterator and counted_iterator

This implements most of the remaining C++20 additions to the <iterator>
header.

* include/bits/iterator_concepts.h (ranges::iter_swap): Fix parameter
types of poison pill overload. Use remove_reference_t when checking
constraints.
* include/bits/stl_iterator.h (move_sentinel): Define for C++20.
(move_iterator): Adjust definitions of nested types for C++20. Add
hidden friends for move_sentinel operations, iter_move and iter_swap.
(common_iterator, counted_iterator): Define for C++20.
* testsuite/24_iterators/move_iterator/cust.cc: New test.
* testsuite/24_iterators/move_iterator/sentinel.cc: New test.
* testsuite/24_iterators/common_iterator/1.cc: New test.
* testsuite/24_iterators/counted_iterator/1.cc: New test.

From-SVN: r278698
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/testsuite/24_iterators/common_iterator/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/counted_iterator/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/move_iterator/cust.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/move_iterator/sentinel.cc [new file with mode: 0644]