map-macro
map-macro copied to clipboard
A recursive C preprocessor macro which performs an operation on each element of a list
when using `__VA_OPT__` you can make this even more compact ``` #define EVAL0(...) __VA_ARGS__ #define EVAL1(...) EVAL0( EVAL0 ( EVAL0 ( __VA_ARGS__ ))) #define EVAL2(...) EVAL1( EVAL1 ( EVAL1 (...
Hi, I started adding [appveyor testing](https://ci.appveyor.com/project/cbeck88/visit-struct/build/1.0.3) to my lib that was using this, and I found that msvc wouldn't work with it. I thought that I had gotten it to...
Is there any way to extend that macro so you can apply it to pairs of arguments? Something like this: ``` #define DECL_VAR(type,var)\ type _##var; #define DECL_GETSET(type,var)\ type get_##var() const...
``` #define TRANSFORM_DECLTYPE(MInput) decltype(MInput) #define DECLTYPE_LIST(...) MAP_LIST(TRANSFORM_DECLTYPE, __VA_ARGS__) DECLTYPE_LIST(a,b,c) DECLTYPE_LIST() ``` Results in: ``` decltype(a), decltype(b), decltype(c) decltype() ``` I expected the case where no arguments are passed to expand...
In addition to my previous PR #6, this branch adds support for the MS Visual C++ compiler, fixing bug #4 . To achieve this, evaluation of the variadic macros is...
These macros allow the user to pass a single value to all invocations of the user macro (as proposed in the [this StackOverflow comment](https://stackoverflow.com/questions/6707148/foreach-macro-on-macros-arguments/13459454#comment51455537_13459454) and the *_I variants additionally pass...
Hi, What I'm trying to achieve is this : ` const char _1[] PROGMEM = "This is a simple string array"; const char _2[] PROGMEM = "located in flash memory";...
Dear author: Thank you for creating and maintaining this project. Recently, I’ve been exploring preprocessor-based arithmetic, and I’d like to propose a pull request that significantly **extends the supported range...