3 ms·
C Preprocessor Trick for Implementing Similar Data Types (2000)
- veli_joza 10y agoI find this technique to be one of applications of X Macro pattern[1]. It's a very effective way to get around the rigidness of C language, but the price is sometimes you have to look at pre-processed source code to make sense of it. For gcc, this can be generated using -E flag. [1] https://en.m.wikipedia.org/wiki/X_Macro https://en.m.wikipedia.org/wiki/X_Macro