XTE_EACH()

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

Expands a given function-like macro for 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, does not wrap arguments in parentheses.



Example

#define M(x) x##0

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