4 ms·
It is possible to get rid of moc by manually writing out the equivalent code (using macros or not) or gutting out features that require it. Qt uses it to do thi
by jchw 4y ago
It is possible to get rid of moc by manually writing out the equivalent code (using macros or not) or gutting out features that require it. Qt uses it to do things that would otherwise not be possible, like expose QObjects to scripting languages. That requires reflection that modern C++ doesn't support and thus needs either redundancy of some kind (to generate the necessary metadata to do 'reflection') or code generation (to generate the necessary metadata to do 'reflection').
MOC was never simply superfluous.