P99
Modules | Macros | Functions
Allocation facilities throught the preprocessor
+ Collaboration diagram for Allocation facilities throught the preprocessor:

Modules

 Flexible array members
 

Macros

#define P99_ALLOC(...)   P99_IF_GT(P99_NARG(__VA_ARGS__), 1)(P00_ALLOC(__VA_ARGS__))(P00_VMALLOC(__VA_ARGS__))
 
#define P99_CALLOC(T, N)
 A type oriented replacement for calloc. More...
 
#define P99_DECLARE_DELETE(T)
 Declare a ‘delete’ operator for type T. More...
 
#define P99_DEFINE_DELETE(T)   P99_INSTANTIATE(void, P99_PASTE2(T, _delete), T const*)
 
#define P99_INITIALIZE(X, L)   P00_ABLESS(P00_INITIALIZE((X), (L)), *(X))
 
#define P99_MALLOC(X)   malloc(sizeof(X))
 A type oriented malloc wrapper. More...
 
#define P99_MAXOF(A, B)   ((A) < (B) ? (B) : (A))
 
#define P99_MINOF(A, B)   ((A) < (B) ? (A) : (B))
 
#define P99_NEW(...)   P99_IF_LT(P99_NARG(__VA_ARGS__), 2)(P00_NEW(__VA_ARGS__))(P00_NEW_ARGS(__VA_ARGS__))
 Allocate an element of type T as given by the first argument and initialize it with the remaining arguments, if any. More...
 
#define P99_REALLOC(X, T)   realloc((X), sizeof(T))
 A type oriented realloc wrapper. More...
 
#define P99_SIZEOF(T, F, ...)   P99_IF_EQ(P99_NARG(__VA_ARGS__), 1)(sizeof(__VA_ARGS__))(P00_SIZEOF2(__VA_ARGS__))
 Determine the size of field F in structure T. More...
 

Functions

size_t p99_maxof (size_t p00_m, size_t p00_n)
 

Detailed Description

p
P00_CLAUSE2 p(P00_WEAK1(p00_cb))(P00_WEAK2(p00_cb)) pp99_callback_stack p00_at_quick_exit
P99_PASTE2
#define P99_PASTE2(_1, _2)
Paste two token sequences at their junction.
Definition: p99_paste.h:82
P99_CALLOC
#define P99_CALLOC(T, N)
A type oriented replacement for calloc.
Definition: p99_new.h:268
P99_REALLOC
#define P99_REALLOC(X, T)
A type oriented realloc wrapper.
Definition: p99_new.h:228
P99_MALLOC
#define P99_MALLOC(X)
A type oriented malloc wrapper.
Definition: p99_new.h:190