[PATCH] libsupc++: Implement comparison algorithms for C++20

Jonathan Wakely jwakely@redhat.com
Wed Nov 13 21:45:00 GMT 2019


On 13/11/19 18:52 +0100, Daniel Krügler wrote:
>Am Mi., 13. Nov. 2019 um 17:26 Uhr schrieb Jonathan Wakely <jwakely@redhat.com>:
>>
>> This is incomplete because std::strong_order doesn't support
>> floating-point types.
>
>I'm wondering whether the local __cat lambda expression at the
>beginning of __fp_weak_ordering is part of the incomplete code or just
>spurious?

Oops, it's spurious. That was part of a previous implementation, but
is no longer used. I'll remove that.

__fp_weak_order is complete, it's the strong_order implementation for
floating-point types that's missing. I'll be posting that in reply to
https://gcc.gnu.org/ml/libstdc++/2019-11/msg00011.html in a few
minutes.

However, I think __fp_weak_order will fail for __float128 because
comparisons involving 128-bit NaNs are not valid in constant
expressions. I'll add some tests with __float128 and investigate that.



More information about the Libstdc++ mailing list