XTE_EACH()

Defined in header
<xte/preproc/each.hpp>

Expands a given function-like macro with every argument passed.


Definition

#each
#define XTE_EACH(_func, ...) /* ... */
Separates expanded expressions with commas.

#delim
#define XTE_EACH_DELIM(_func, _delim, ...) /* ... */
Separates expanded expressions with the provided _delimeter.
If no callback is passed, avoids wrapping the expressions being iterated over in parentheses.


Example

#define M(x) x##0

XTE_EACH_DELIM(M, +, 1, 2, 3)
Preprocessor output:
10 + 20 + 30
[View in Compiler Explorer]