P99

◆ P99_TOKJOIN

#define P99_TOKJOIN (   TOK,
  ... 
)
Value:
P99_IF_LT(P99_NARG(__VA_ARGS__), 2) \
(__VA_ARGS__) \
(P99_FOR(TOK, P99_NARG(__VA_ARGS__), P00_TOKJOIN, P00_IDT, __VA_ARGS__))

join a list with a specific token given as the first argument

Examples

P99_TOKJOIN(+, 1, 2, 3) -> 1+2+3
P99_TOKJOIN(., f(), a, length) -> f().a.length
Warning
argument 0 may be evaluated multiple times

Definition at line 517 of file p99_for.h.

P99_TOKJOIN
#define P99_TOKJOIN(TOK,...)
join a list with a specific token given as the first argument
Definition: p99_for.h:517
f
f
Definition: p99_str.h:138
P99_NARG
#define P99_NARG(...)
Return the length of the variable length argument list, where an empty argument list is considered to...
Definition: p99_args.h:117
P99_IF_LT
#define P99_IF_LT(A, B)
Test two decimal numbers A and B for whether A is strictly less than B.
Definition: p99_if.h:120
P99_FOR
#define P99_FOR(NAME, N, OP, FUNC,...)
A preprocessor pseudo iterator.
Definition: p99_for.h:92