[Development] Raising the minimum to C++20

Marc Mutz marc.mutz at qt.io
Thu May 4 09:53:05 CEST 2023


On 04.05.23 08:52, Maurice Kalinowski via Development wrote:
[...]
> This is the situation we experience in multiple industries still, with an increasing pressure from multiple angles to get those finally supporting Qt 6. Hence, things are getting better for C++17 _now_.
[...]

This actually sounds like an argument for _earlier_ adoption. If Qt, as 
an important component in the ecosystem, slows the pace, then OEMs feel 
even less pressure to update their toolchains, making the problem worse 
for the industry at large.

The main problem I have with this line of reasoning is that I think it's 
the LTS's job to serve those customers that end up in these situations. 
So it's not like those customer's can't use Qt, they just can't use the 
latest features. But they can't, anyway, because they have such an old 
toolchain. I wonder how much of this is customer' requests and how much 
of it our desire to move customers off Qt 5?

One way to skin this particular cat would be to keep non-core modules 
compatible with the last LTS to give users access to newer features in 
those modules without having to update tool-chains. Realistically, most 
of the bang we get from a C++20 requirement is in QtBase and, possibly, 
QtDeclarative. IIUC, we do this for some part of qtdeclarative and for 
qtwebengine already, and, while it's occasionally annoying, it lets us 
eat our own dog-food, too.

Speaking with the tongue of the Qt OSS project, I fail to see how all 
this isn't SEP. Users of such OEM boards have several ways to solve the 
problem:
- pressure the OEM to support a six-year-old C++ standard
- pay someone (TQtC, KDAB) to build a newer toolchain on top of the old 
one, or do in-house
- vote with your feet and switch to an OEM that has a better customer 
service

Playing the devil's advocate: What's Qt got to do with this?

Thanks,
Marc

PS: doesn't chromium now require C++20, too? How are we going to deal 
with another 5 years¹ of C++17 if a critical 3rd-party component, too 
huge for us to maintain ourselves, uses its clang-tooling foo to 
modernize every aspect of its code base w.r.t. C++20 idioms?

¹ Qt 6.8 release² in Mar '25 + 3yr support = Mar '28.

² dev qwebengine maintains compat with the last LTS

-- 
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