[Development] C++20 @ Qt

Marc Mutz marc.mutz at qt.io
Wed Nov 2 15:52:30 CET 2022


Hi,

This is just an anchor email to group the individual upcoming threads 
together. Please only reply to it to open a new topic.

On the last QtCS, we've talked a bit about when the right time would be 
for Qt 6 to switch to require C++20 
(https://wiki.qt.io/Qt_Contributors_Summit_2022_-_Program/C%2B%2B20_in_Qt).

The tentative schedule was to try to get that done after the next LTS, 
which is 6.5, so 6.6. We're not sure whether all platforms will be able 
to provide a C++20-capable compiler, but we're in contact with the usual 
suspects. More on this when we have more feedback. ATM, it's not clear 
that we'll be able to do the switch already for 6.6.

However, there are some things that we can already do without requiring 
C++20, even though an earlier discussion on this ML didn't yield 
consensus to allow C++20 types in the Qt ABI 
(https://lists.qt-project.org/pipermail/development/2022-January/042151.html).

We can, however, use them in the A_P_I, if we ensure they don't end up 
in the A_B_I (inline-only API, with workarounds for inline members of 
exported classes (i.e. use of QT_POST_CXX17_API_IN_EXPORTED_CLASS)).

I will open sub-threads for some C++20 features below this email over 
the next weeks, to keep the discussion targeted.

I'll open with C++20 comparisons and std::span.

Thanks,
Marc






More information about the Development mailing list