Skip to content

Instantly share code, notes, and snippets.

@cingoli
cingoli / FOR_EACH.cmacros.h
Created December 27, 2019 09:20 — forked from thwarted/FOR_EACH.cmacros.h
a FOR_EACH C Preprocessor macro that works under both GNU CC and Visual Studio 2013/MSVC
/* all this verbosity is required for this to work reliably and predictably
* on both GCC and MSVC
*/
/* because gcc cpp doesn't recursively expand macros, so a single CALLIT
* macro can't be used in all the FE_n macros below
*/
#define FE_CALLITn01(a,b) a b
#define FE_CALLITn02(a,b) a b