Is it possible for a macro to expand to code that will be executed exactly once when a program starts, regardless of how many times it's used?

后端 未结 0 838
鱼传尺愫
鱼传尺愫 2020-12-02 13:56

In my Qt apps, I use a precompiler macro to automatically both declare and register a metatype:

#define Q_DECLARE_AND_REGISTER_METATYPE(TYPE) \\
    Q_DECLARE         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题