]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Define operator<=> for <system_error> types
authorJonathan Wakely <jwakely@redhat.com>
Fri, 7 Feb 2020 20:50:00 +0000 (20:50 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 20 Feb 2020 12:27:48 +0000 (12:27 +0000)
commit4be779f59b04947324889b7e1488fb9a68c81d53
tree18dba4d2ec1154e09d1adb6d3fe1427d481617a9
parent20fa41e61fd2d2839ca47e0dfac6976c552ab648
libstdc++: Define operator<=> for <system_error> types

Another piece of P1614R2 for C++20.

This also adds tests for operator< in C++11, which was present but
untested.

* include/std/system_error (error_category::operator<=>)
(operator<=>(const error_code&, const error_code&))
(operator<=>(const error_condition&, const error_condition&)): Define
for C++20.
* testsuite/19_diagnostics/error_category/operators/less.cc: New test.
* testsuite/19_diagnostics/error_category/operators/three_way.cc: New
test.
* testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
incorrect comment.
* testsuite/19_diagnostics/error_code/operators/less.cc: New test.
* testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
incorrect comment.
* testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
* testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
incorrect comment.
* testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
* testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
Remove incorrect comment.
* testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
test.
12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/system_error
libstdc++-v3/testsuite/19_diagnostics/error_category/operators/less.cc [new file with mode: 0644]
libstdc++-v3/testsuite/19_diagnostics/error_category/operators/three_way.cc [new file with mode: 0644]
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/less.cc [new file with mode: 0644]
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/three_way.cc [new file with mode: 0644]
libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc
libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/less.cc [new file with mode: 0644]
libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc
libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/three_way.cc [new file with mode: 0644]
This page took 0.060977 seconds and 6 git commands to generate.