eĿlipsis
a language independent preprocessor
 
Loading...
Searching...
No Matches
ellipsis-cumulative.dirs File Reference

Macros

#define ELLIPSIS_AND(X, …)   (X)__VA_OPT__(∧)__VA_TAIL__()
 Logical and the arguments in the argument list.
 
#define ELLIPSIS_BAND(X, …)   (X)__VA_OPT__(∩)__VA_TAIL__()
 Bitwise and the arguments in the argument list.
 
#define ELLIPSIS_BOR(X, …)   (X)__VA_OPT__(∪)__VA_TAIL__()
 Bitwise or the arguments in the argument list.
 
#define ELLIPSIS_ISANY(X, …)   __BIND__((Y, …) ((X) ≡ (Y)) __BIND_OPT__(∨)__BIND_TAIL__())(__VA_ARGS__)
 Test equality for an expression against a set of expressions.
 
#define ELLIPSIS_MAP(F, …)   __BIND__((Y, ...) F(Y)__BIND_OPT__(, ) __BIND_TAIL__())(__VA_ARGS__)
 Map the macro or function FUNC over all arguments.
 
#define ELLIPSIS_MUL(X, …)   (X)__VA_OPT__(×)__VA_TAIL__()
 Multiply the arguments in the argument list.
 
#define ELLIPSIS_OR(X, …)   (X)__VA_OPT__(∨)__VA_TAIL__()
 Logical or the arguments in the argument list.
 
#define ELLIPSIS_REF(X, …)   X __VA_OPT__(→)__VA_TAIL__()
 Chain of reference of the arguments in the argument list.
 
#define ELLIPSIS_SEMICOLON(X, …)   X __VA_OPT__(; )__VA_TAIL__()
 Separate the arguments in the argument list with a semicolon instead of a comma.
 
#define ELLIPSIS_SPACE(X, …)   X __VA_TAIL__( )
 Separate the arguments in the argument list with a space instead of a comma.
 
#define ELLIPSIS_SUM(X, …)   (X)__VA_OPT__(+)__VA_TAIL__()
 Sum up the arguments in the argument list.
 
#define ELLIPSIS_VALID(...)   ELLIPSIS_VALID___VA_OPT__(I)(__VA_ARGS__)
 Test the validity of a chain of references.
 
#define ELLIPSIS_VALID_(...)   (true)
 
#define ELLIPSIS_VALID_I(...)   ELLIPSIS_VALID_Iplus(__VA_ARGS__)
 
#define ELLIPSIS_VALID_Iplus(X, ...)   (X) __VA_OPT__(∧ELLIPSIS_VALID_II((X), __VA_ARGS__))
 
#define ELLIPSIS_XOR(X, …)   (X)__VA_OPT__(^)__VA_TAIL__()
 Bitwise exclusive or the arguments in the argument list.
 

Macro Definition Documentation

◆ ELLIPSIS_AND

#define ELLIPSIS_AND (   X,
  … 
)    (X)__VA_OPT__(∧)__VA_TAIL__()

Logical and the arguments in the argument list.

◆ ELLIPSIS_BAND

#define ELLIPSIS_BAND (   X,
  … 
)    (X)__VA_OPT__(∩)__VA_TAIL__()

Bitwise and the arguments in the argument list.

◆ ELLIPSIS_BOR

#define ELLIPSIS_BOR (   X,
  … 
)    (X)__VA_OPT__(∪)__VA_TAIL__()

Bitwise or the arguments in the argument list.

◆ ELLIPSIS_ISANY

#define ELLIPSIS_ISANY (   X,
  … 
)    __BIND__((Y, …) ((X) ≡ (Y)) __BIND_OPT__(∨)__BIND_TAIL__())(__VA_ARGS__)

Test equality for an expression against a set of expressions.

For example in C

if (ELLIPSIS_ISANY(a, b, c, d, e)) {
...
}
#define ELLIPSIS_ISANY(X, …)
Test equality for an expression against a set of expressions.
Definition ellipsis-cumulative.dirs:23

would expand to

if (((a) == (b)) ||((a) == (c)) ||((a) == (d)) ||((a) == (e))) {
...
}
Warning
The first argument is evaluated for each element in the list.

◆ ELLIPSIS_MAP

#define ELLIPSIS_MAP (   F,
  … 
)    __BIND__((Y, ...) F(Y)__BIND_OPT__(, ) __BIND_TAIL__())(__VA_ARGS__)

Map the macro or function FUNC over all arguments.

◆ ELLIPSIS_MUL

#define ELLIPSIS_MUL (   X,
  … 
)    (X)__VA_OPT__(×)__VA_TAIL__()

Multiply the arguments in the argument list.

◆ ELLIPSIS_OR

#define ELLIPSIS_OR (   X,
  … 
)    (X)__VA_OPT__(∨)__VA_TAIL__()

Logical or the arguments in the argument list.

◆ ELLIPSIS_REF

#define ELLIPSIS_REF (   X,
  … 
)    X __VA_OPT__(→)__VA_TAIL__()

Chain of reference of the arguments in the argument list.

◆ ELLIPSIS_SEMICOLON

#define ELLIPSIS_SEMICOLON (   X,
  … 
)    X __VA_OPT__(; )__VA_TAIL__()

Separate the arguments in the argument list with a semicolon instead of a comma.

◆ ELLIPSIS_SPACE

#define ELLIPSIS_SPACE (   X,
  … 
)    X __VA_TAIL__( )

Separate the arguments in the argument list with a space instead of a comma.

◆ ELLIPSIS_SUM

#define ELLIPSIS_SUM (   X,
  … 
)    (X)__VA_OPT__(+)__VA_TAIL__()

Sum up the arguments in the argument list.

◆ ELLIPSIS_VALID

#define ELLIPSIS_VALID (   ...)    ELLIPSIS_VALID___VA_OPT__(I)(__VA_ARGS__)

Test the validity of a chain of references.

If any arguments, the first should resolve to an object and then the remaining arguments to names that recursively define members for the corresponding language. For example in C

if (ELLIPSIS_VALID(x, my, chain, of, members)) {
...
}
#define ELLIPSIS_VALID(...)
Test the validity of a chain of references.
Definition ellipsis-cumulative.dirs:21

would expand to

if ((x) &&((x)→my) &&((x)→my→chain) &&((x)→my→chain→of) &&((x)→my→chain→of→members)) {
...
}
Warning
The first argument is evaluated for each element in the list.
Remarks
An empty list results in (true)

◆ ELLIPSIS_VALID_

#define ELLIPSIS_VALID_ (   ...)    (true)

◆ ELLIPSIS_VALID_I

#define ELLIPSIS_VALID_I (   ...)    ELLIPSIS_VALID_Iplus(__VA_ARGS__)

◆ ELLIPSIS_VALID_Iplus

#define ELLIPSIS_VALID_Iplus (   X,
  ... 
)    (X) __VA_OPT__(∧ELLIPSIS_VALID_II((X), __VA_ARGS__))

◆ ELLIPSIS_XOR

#define ELLIPSIS_XOR (   X,
  … 
)    (X)__VA_OPT__(^)__VA_TAIL__()

Bitwise exclusive or the arguments in the argument list.