As a C++ like feature, this series of macros can be used to provide default arguments to functions and also to improve type safety for variadic functions. More...
|#define||P99_CALL_DEFARG(NAME, M,...) NAME(__VA_ARGS__)|
|Define a replacement macro for functions that can provide default arguments to the underlying real function. |
|#define||P99_CALL_DEFARG_LIST(NAME, M,...) __VA_ARGS__|
|Expand an argument list with default arguments. |
|#define||P99_CALL_VA_ARG(NAME, M, T,...) NAME(__VA_ARGS__)|
|Assure type safety for variadic functions. |
|Provide default arguments for macro NAME. |
|Provide a documentation section to a function defined with P99_CALL_DEFARG. |
|Define the symbols that are declared through a corresponding call P99_DECLARE_DEFARG. |
|#define||P99_INSTANTIATE(RT, NAME,...) RT NAME(__VA_ARGS__)|
|Instantiate an inline function. |
|Define the prototype of function NAME. |
As a C++ like feature, this series of macros can be used to provide default arguments to functions and also to improve type safety for variadic functions.
This goes in several parts.
Another feature that is provided here is a macro that allows you to prescribe a certain type to the arguments of a variadic function. In plain C these are dangerous, since C cannot guess the type that the implementation of the function expects. P99_CALL_VA_ARG may be used to overcome this problem.