On Tuesday, 14 November 2023 08:25:34 PST Ivan Solovev via Development wrote: > > The ABI functions can return one of these other types: > > bool (for equality comparisons) > > int (for non-partial ordering) > > QPartialOrdering (for partial ordering) > > IIUC, returning QPartialOrdering is exactly what we want to avoid, due to > the std::partial_ordering -> QPartialOrdering (and reverse) conversions.
That boat sailed in 6.1 because QPartialOrdering is already used in QMetaType and QVariant API/ABI. Ideally for new out-of-line APIs, we could return a type that is ABI- compatible with std::partial_order. But how many of those are we going to get? > As we figured out earlier in this discussion, by making Qt::partial_ordering > binary compatible with std::partial_ordering, we will allow the compiler to > optimize the code and avoid the conversions (specially if we use > std::bit_cast). Yes, but the impact only applies to when it needs to translate from out-of- line to out-of-line. If either side is inline, it'll do the right thing on its own. -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development