]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Add comparison operators to sequence containers
authorJonathan Wakely <jwakely@redhat.com>
Fri, 17 Apr 2020 22:41:04 +0000 (23:41 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 17 Apr 2020 22:41:04 +0000 (23:41 +0100)
commitbd2420f8faaf4bb33310e82f7dd45c5e33476c87
tree195aaff3ff206340a940f18b91d19c5ae9e2c507
parent3737ccc424c56a2cecff202dd79f88d28850eeb2
libstdc++: Add comparison operators to sequence containers

Some more C++20 changes from P1614R2, "The Mothership has Landed".

This implements <=> for sequence containers (and the __normal_iterator
and _Pointer_adapter class templates).

* include/bits/forward_list.h (forward_list): Define operator<=> and
remove redundant comparison operators for C++20.
* include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
* include/bits/stl_deque.h (deque): Likewise.
* include/bits/stl_iterator.h (__normal_iterator): Likewise.
* include/bits/stl_list.h (list): Likewise.
* include/bits/stl_vector.h (vector): Likewise.
* include/debug/deque (__gnu_debug::deque): Likewise.
* include/debug/forward_list (__gnu_debug::forward_list): Likewise.
* include/debug/list (__gnu_debug::list): Likewise.
* include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
Likewise.
* include/debug/vector (__gnu_debug::vector): Likewise.
* include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
operator<=> for C++20.
* testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
* testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
* testsuite/23_containers/list/cmp_c++20.cc: New test.
* testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
* testsuite/23_containers/vector/cmp_c++20.cc: New test.
18 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/forward_list.h
libstdc++-v3/include/bits/stl_bvector.h
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/forward_list
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/safe_iterator.h
libstdc++-v3/include/debug/vector
libstdc++-v3/include/ext/pointer.h
libstdc++-v3/testsuite/23_containers/deque/operators/cmp_c++20.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/cmp_c++20.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/cmp_c++20.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/bool/cmp_c++20.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/cmp_c++20.cc [new file with mode: 0644]
This page took 0.066717 seconds and 6 git commands to generate.