libstdc++: Define <=> for tuple, optional and variant
authorJonathan Wakely <jwakely@redhat.com>
Fri, 21 Feb 2020 12:02:15 +0000 (12:02 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 21 Feb 2020 17:12:39 +0000 (17:12 +0000)
commit9e58988061f4175896de11af0caf9bdd48c9b046
tree324fbbc0975fb49b2901280792048f5d95aa90b7
parent131fbdd7b750faecd7c874dc97adb01b53d073ea
libstdc++: Define <=> for tuple, optional and variant

Another piece of P1614R2.

* include/std/optional (operator<=>(optional<T>, optional<U>))
(operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
Define for C++20.
* include/std/tuple (__tuple_cmp): New helper function for <=>.
(operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
* include/std/variant (operator<=>(variant<T...>, variant<T...>))
(operator<=>(monostate, monostate)): Define for C++20.
* testsuite/20_util/optional/relops/three_way.cc: New test.
* testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
* testsuite/20_util/variant/89851.cc: Move to ...
* testsuite/20_util/variant/relops/89851.cc: ... here.
* testsuite/20_util/variant/90008.cc: Move to ...
* testsuite/20_util/variant/relops/90008.cc: ... here.
* testsuite/20_util/variant/relops/three_way.cc: New test.
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/optional
libstdc++-v3/include/std/tuple
libstdc++-v3/include/std/variant
libstdc++-v3/testsuite/20_util/optional/relops/three_way.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/tuple/comparison_operators/three_way.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/variant/89851.cc [deleted file]
libstdc++-v3/testsuite/20_util/variant/90008.cc [deleted file]
libstdc++-v3/testsuite/20_util/variant/relops/89851.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/variant/relops/90008.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/variant/relops/three_way.cc [new file with mode: 0644]