Hi,
I noticed that the Q_DECLARE_METATYPE macro contains another macro in this line:
static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0);
How is Q_BASIC_ATOMIC_INITIALIZER expanded inside this macro? I thought you couldn’t use a macro inside another macro.
I’m asking because I register types in my program using my own macro, and it’d be helpful if I could register the type to Qt at the same time. Right now, I call both MY_TYPE_REGISTER_MACRO(MyClass) and Q_DECLARE_METATYPE(MyClass) in my program.
↧