libsupc++: Implement comparison algorithms for C++20
commit0ff15d21c8602ad78129c0a6baab821c4090de71
authorJonathan Wakely <jwakely@redhat.com>
Wed, 13 Nov 2019 16:26:18 +0000 (13 16:26 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 13 Nov 2019 16:26:18 +0000 (13 16:26 +0000)
treeb005ed160604bbf471c4acf6a754ffef95d9bc52
parent5d46287769a5224d7d3495b54e64da25fc76f01a
libsupc++: Implement comparison algorithms for C++20

This is incomplete because std::strong_order doesn't support
floating-point types.

The partial_order and weak_order tests use VERIFY instead of
static_assert because of PR 92431.

* libsupc++/compare (strong_order, weak_order, partial_order)
(compare_strong_order_fallback, compare_weak_order_fallback)
(compare_partial_order_fallback): Define customization point objects
for C++20.
* testsuite/18_support/comparisons/algorithms/partial_order.cc: New
test.
* testsuite/18_support/comparisons/algorithms/strong_order.cc: New
test.
* testsuite/18_support/comparisons/algorithms/weak_order.cc: New test.

From-SVN: r278149
libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/compare
libstdc++-v3/testsuite/18_support/comparisons/algorithms/partial_order.cc [new file with mode: 0644]
libstdc++-v3/testsuite/18_support/comparisons/algorithms/strong_order.cc [new file with mode: 0644]
libstdc++-v3/testsuite/18_support/comparisons/algorithms/weak_order.cc [new file with mode: 0644]