A file full of preprocessor helpers.
|
Defines |
|
#define | ppCastPtr(type) (type)(void*) |
| | Do a typecast that doesn't trigger B.S. 'type punned pointer' warnings.
|
|
#define | ppNULL |
| | Placeholder "nothing" parameter for preprocessor directives.
|
|
#define | ppCM , |
| | Drop a comma ',' into a block of template junk so preprocessor doesn't interpret it.
|
|
#define | ppLP ( |
| | Drop a left-parenthesis '(' into a block of template junk so preprocessor doesn't interpret it.
|
|
#define | ppRP ) |
| | Drop a right-parenthesis ')' into a block of template junk so preprocessor doesn't interpret it.
|
| #define | ppEat(p) |
| | Eat some trailing thing from an expansion.
|
| #define | ppEat2(p1, p2) |
| | Eat some more trailing things from an expansion.
|
| #define | ppToken(d) d |
| | Force separate translation of intermediate preprocessor stage.
|
| #define | ppTokStr(d) _ppTokStr(d) |
| | Interpret, then convert a preprocessor directive (d) into a string.
|
|
#define | ppConcat(a, b) _ppConcat(a,b) |
| | Interpret two tokens, concatenate the results together.
|
|
#define | ppConcat3(a, b, c) _ppConcat3(a,b,c) |
| | Interpret three tokens, concatenate the results together.
|
|
#define | ppConcat4(a, b, c, d) _ppConcat4(a,b,c,d) |
| | Interpret four tokens, concatenate the results together.
|
|
#define | ppConcat5(a, b, c, d, e) _ppConcat5(a,b,c,d,e) |
| | Interpret four tokens, concatenate the results together.
|
|
#define | ppConcat6(a, b, c, d, e, f) _ppConcat6(a,b,c,d,e,f) |
| | Interpret four tokens, concatenate the results together.
|
| #define | ppScr(label) ppConcat(label,__LINE__) |
| | Build a unique scratch label for macro functions.
|
|
#define | ppC_CPP(c, cpp) c |
| | Selectively choose C or CPP based on C or C++ compiler.
|
|
#define | ppRaw(rawcooked, raw) ppConcat(ppRAW_,rawcooked)(raw) |
| | Selectively choose 'raw' or 'cooked' code, such as containers that contain raw.
|
|
#define | ppForUnit(p) |
| | Make cutting unit-based definitions a little easier.
|
| #define | offsetof(s, m) ((size_t)&(((s *)0)->m)) |
| | Get offset of member 'm' in class or struct 's'.
|
| #define | dereference(s, m, p) ((s *)((size_t)(p) - offsetof(s,m))) |
| | Convert a pointer 'p' *KNOWN* to be from a member of 's' back to a pointer to 's'.
|
A file full of preprocessor helpers.