Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.x
-
-
Foundation PM Staging
Description
C++20 is now approved,
There's Visual Studio C++ module support,
Also for Clang,
And there's GCC modules branch
Maybe it's time to talk about supporting that features in Qt tools?
If I understand correctly, moc has to detect that "header" it scanned is actually a module interface unit (it has export module Foo;), and so it has to generate respective moc_Foo.cpp that will be one of the module implementation units, that:
- starts with module;,
- has all neccessarry-for-black-moc-magic includes in global module fragment,
- module Foo; to note that it's module implementation unit for that module Foo it found Q_OBJECT in earlier,
- Then all that moc-generated magic code (except for #include's as they can be only in global fragment?).
This issue does not imply that Qt has to ship it's code in C++20 modules, it's simply that moc support will allow users of Qt to use Qt classes within user-defined modules.