aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTomasz Kamiński <tkaminsk@redhat.com>2025-08-28 11:10:05 +0200
committerTomasz Kamiński <tkaminsk@redhat.com>2025-08-28 14:40:48 +0200
commitfcb5cd8e9483daafd6f786f3b607028cb1293ce7 (patch)
treef23827a47d8a5e8dfb427cdceba190730b78ac33 /libjava
parent10418a6cbd34e0a4081f6dcdf8c36a9592aaf318 (diff)
downloadgcc-fcb5cd8e9483daafd6f786f3b607028cb1293ce7.zip
gcc-fcb5cd8e9483daafd6f786f3b607028cb1293ce7.tar.gz
gcc-fcb5cd8e9483daafd6f786f3b607028cb1293ce7.tar.bz2
libstdc++: Provide helpers to interoperate between __cmp_cat::_Ord and ordering types.
This patch adds two new internal helpers for ordering types: * __cmp_cat::__ord to retrieve an internal _Ord value, * __cmp_cat::__make<Ordering> to create an ordering from an _Ord value. Conversions between ordering types are now handled by __cmp_cat::__make. As a result, ordering types no longer need to befriend each other, only the new helpers. The __fp_weak_ordering implementation has also been simplified by: * using the new helpers to convert partial_ordering to weak_ordering, * using strong_ordering to weak_ordering conversion operator, for the __isnan_sign comparison, * removing the unused __cat local variable. Finally, the _Ncmp enum is removed, and the unordered enumerator is added to the existing _Ord enum. libstdc++-v3/ChangeLog: * libsupc++/compare (__cmp_cat::_Ord): Add unordered enumerator. (__cmp_cat::_Ncmp): Remove. (__cmp_cat::__ord, __cmp_cat::__make): Define. (partial_ordering::partial_ordering(__cmp_cat::_Ncmp)): Remove. (operator<=>(__cmp_cat::__unspec, partial_ordering)) (partial_ordering::unordered): Replace _Ncmp with _Ord. (std::partial_ordering, std::weak_ordering, std::strong_ordering): Befriend __ord and __make helpers, remove friend declartions for other orderings. (__compare::__fp_weak_ordering): Remove unused __cat variable. Simplify ordering conversions. Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
Diffstat (limited to 'libjava')
0 files changed, 0 insertions, 0 deletions