Counting preprocessor macros

后端 未结 5 2019
离开以前
离开以前 2021-01-02 03:46

I have this macro code, which allows me to define both a C enum and a list of the enumerated names as strings using one construct. It prevents me from havi

5条回答
  •  佛祖请我去吃肉
    2021-01-02 04:08

    See the suggestions Mu Dynamics 'Enums, Strings and Laziness'; these are at least related to what you're after.

    Otherwise, look at the Boost Preprocessor collection (which is usable with the C preprocessor as well as the C++ preprocessor).

提交回复
热议问题