P99

◆ P99_IS_ONE

#define P99_IS_ONE (   FIRST,
  ... 
)    P99_FOR(== (FIRST), P99_NARG(__VA_ARGS__), P00_OR, P00_ISIT, __VA_ARGS__)

Check if argument FIRST is equal to one of the other elements in the list.

Use this as follows:

if (P99_IS_ONE(23, b, c, d, e, f)) {
// one of the guys is 23, do something special
} else {
// handle the base case
}
Warning
argument 0 may be evaluated multiple times

Definition at line 386 of file p99_for.h.

f
f
Definition: p99_str.h:138
P99_IS_ONE
#define P99_IS_ONE(FIRST,...)
Check if argument FIRST is equal to one of the other elements in the list.
Definition: p99_for.h:386
d
d
Definition: p99_str.h:138