[Development] Proposing to officially allow C++20 types in Qt 6 ABIs

Marc Mutz marc.mutz at qt.io
Fri Jan 28 01:49:22 CET 2022


Hi Thiago,

> On Thursday, 27 January 2022 13:35:54 PST Thiago Macieira wrote:
> > I think it's fine to make the check per OS. But we can't use the __cpp_lib
> > variables.
>
> Alternative: we use the __cpp_lib macros, but we assert they are set in a .cpp
> file for the platforms where binary compatibility and ABI matter.

That would break projects that build their Qt themselves (embedded), and with C++17 (because, you know, compile times increase with every std version 🙂).

Basically, we need a way to provide C++20 ABIs when Qt was compiled in C++20 mode, and if not, then not. We had that already in Qt 5.x, x < 7, when C++11 was optional, but we used C++11 in exported inline API, so AFAIU, CMIIW, the move special member functions were part of the ABI if you compiled your Qt in C++11 on Windows and they were missing from the ABI when Qt was built in C++98 mode. And there we even had the BiC between std::string/98 and std::string/11 while exporting inline QString::toStdString() (granted, that was on GCC, but doesn't that mean we had the problem on MingW, then?).

Thanks,
Marc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20220128/0802968c/attachment.htm>


More information about the Development mailing list