[Development] Request for early MOC support for C++20 Modules
Thiago Macieira
thiago.macieira at intel.com
Fri Dec 15 21:33:24 CET 2023
On Friday, 15 December 2023 11:07:44 -03 Fabian Kosmale via Development wrote:
> 1. moc's parsing logic needs to learn about the relevant new keywords. moc
> needs to know at the very least the module (partition)'s name.
Please forgive my lack of knowledge on this and asking of very basic
questions. That's why I asked Ville during QtCS two weeks ago for someone to
investigate module support and explain to the rest of us what it would mean to
support them.
Is the file format for the imported modules already standardised? Is it in the
C++ standard? I don't remember seeing it there.
If it's not a standard (ISO C++ standard or otherwise), we'd need to write
format parsers for each compiler, which raises the cost for supporting modules
considerably, especially if the compilers aren't committing to a stable format
in the first place.
Qt should make the commitment that will support at most one module format. Any
compiler that doesn't operate on those will not have their modules supported.
I don't know if this is the same content that CMake had to support. It's
possible it isn't because CMake doesn't need to know about the classes, enums,
variables, functions, and all other entities declared, which are part of the
translation unit. Moc does need that.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Cloud Software Architect - Intel DCAI Cloud Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5163 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20231215/baafe6a8/attachment-0001.bin>
More information about the Development
mailing list