How would I implement something similar to the Objective-C @encode() compiler directive in ANSI C?

后端 未结 3 843
后悔当初
后悔当初 2021-02-03 13:06

The @encode directive returns a const char * which is a coded type descriptor of the various elements of the datatype that was passed in. Example follows:

struct         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-03 13:11

    You would implement this by implementing the ANSI C compiler first and then add some implementation specific pragmas and functions to it.

    Yes i know this is cynical answer and i accept the downvotes.

提交回复
热议问题