-
libstdc++: Implement LWG 3324 for [cmp.alg] function objects (LWG 3324) · 3fd1c229
LWG 3324 changed the [cmp.alg] types to use std::compare_three_way instead of the <=> operator, but we were still using the old specification. In order to make the existing tests pass the N::X type needs to be equality comparable, so that three_way_comparable is satisfied and compare_three_way can be used. As part of this change I noticed that the compare_three_way call operator was unconditionally noexcept, which is incorrect. * libsupc++/compare (compare_three_way): Fix noexcept-specifier. (strong_order, weak_order, partial_order): Replace uses of <=> with compare_three_way function object (LWG 3324). * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add equality operator so that X satisfies three_way_comparable. * testsuite/18_support/comparisons/algorithms/strong_order.cc: Likewise. * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
Jonathan Wakely committed
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
partial_order.cc | Loading commit data... | |
strong_order.cc | Loading commit data... | |
weak_order.cc | Loading commit data... |