libstdc++: Add comparison operators to associative containers
authorJonathan Wakely <jwakely@redhat.com>
Mon, 20 Apr 2020 16:50:10 +0000 (17:50 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 20 Apr 2020 16:50:10 +0000 (17:50 +0100)
commit93843da69772d271a7247ab2536280646086a5ce
treeac24f19cc4285e116b942136827d9de82eda5791
parent8e1e6cdb8fb5ba4cb8a9836a4400f0317ffe0344
libstdc++: Add comparison operators to associative containers

The last C++20 changes from P1614R2, "The Mothership has Landed"

* include/bits/stl_map.h (map): Define operator<=> and remove
operator< for C++20.
* include/bits/stl_multimap.h (multimap): Likewise.
* include/bits/stl_multiset.h (multiset): Likewise.
* include/bits/stl_set.h (set): Likewise.
* include/bits/stl_tree.h (_Rb_tree): Likewise.
(_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
operator!= for C++20.
* include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
* include/debug/multimap.h (__gnu_debug::multimap): Likewise.
* include/debug/multiset.h (__gnu_debug::multiset): Likewise.
* include/debug/set.h (__gnu_debug::set): Likewise.
* testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
* testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
* testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
* testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
14 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_map.h
libstdc++-v3/include/bits/stl_multimap.h
libstdc++-v3/include/bits/stl_multiset.h
libstdc++-v3/include/bits/stl_set.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/set.h
libstdc++-v3/testsuite/23_containers/map/operators/cmp_c++20.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/operators/cmp_c++20.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/operators/cmp_c++20.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/operators/cmp_c++20.cc [new file with mode: 0644]