pputl  0.2.1
pputl Preprocessor Utilities
Macros

Macros

#define PPUTL_GEN_ANY(n, gen, ...)   PPUTL_CAT(PPUTL_DETAIL_GEN_ANY_, n)(gen, __VA_ARGS__)
 
#define PPUTL_GEN_REPEAT(n, ...)   PPUTL_CAT(PPUTL_DETAIL_GEN_REPEAT_, n)(__VA_ARGS__)
 

Detailed Description

Macro Definition Documentation

◆ PPUTL_GEN_ANY

#define PPUTL_GEN_ANY (   n,
  gen,
  ... 
)    PPUTL_CAT(PPUTL_DETAIL_GEN_ANY_, n)(gen, __VA_ARGS__)

generates args by repeating the result of gen(idx, ...?) [0, 256) times

Parameters
n- number of args to generate [0, 256)
gen- generator macro function of the form: f(idx) -> token or f(idx, ...) -> token
...- any args to provide to a generator of the form f(idx, ...) -> token

◆ PPUTL_GEN_REPEAT

#define PPUTL_GEN_REPEAT (   n,
  ... 
)    PPUTL_CAT(PPUTL_DETAIL_GEN_REPEAT_, n)(__VA_ARGS__)

generates args by repeating VA_ARGS [0, 256) times

Parameters
n- number of times to repeat [0, 256)
...- args to repeat