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