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]