[Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

Marc Mutz marc.mutz at qt.io
Tue Nov 14 09:40:31 CET 2023


On 14.11.23 09:31, Marc Mutz via Development wrote:
[...]
> And then naming them Qt::partial_ordering is just consequent, because
> users can reach ultimate SC by doing something like
> 
>       #ifdef __cpp_lib_three_way_comparison
>       using std::partial_ordering;
>       ~~~~
>       #else
>       using Qt::partial_ordering;
>       #endif
> 
>       ~~~ use unqualified partial_ordering ~~~

This will also mean that in Qt 7 we can maintain 100% SC with Qt 6 by 
simply saying

    namespace Qt {
        using partial_ordering = std::partial_ordering;
        using weak_ordering = std::weak_ordering;
        using strong_ordering = std::strong_ordering;
    }

Done.

-- 
Marc Mutz <marc.mutz at qt.io>
Principal Software Engineer

The Qt Company
Erich-Thilo-Str. 10 12489
Berlin, Germany
www.qt.io

Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht Charlottenburg,
HRB 144331 B



More information about the Development mailing list