#include <cdcontainers/casts.h>
#include <cdcontainers/hash.h>
#include <stdbool.h>
#include <stddef.h>
Go to the source code of this file.
◆ CDC_END
◆ CDC_MAX
#define CDC_MAX |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) > (b) ? (a) : (b)) |
◆ CDC_MIN
#define CDC_MIN |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) < (b) ? (a) : (b)) |
◆ CDC_ABS
#define CDC_ABS |
( |
|
x | ) |
((x < 0) ? -(x) : x) |
◆ CDC_ARRAY_SIZE
#define CDC_ARRAY_SIZE |
( |
|
x | ) |
(sizeof(x) / sizeof(x[0])) |
◆ CDC_SWAP
#define CDC_SWAP |
( |
|
T, |
|
|
|
x, |
|
|
|
y |
|
) |
| |
Value:do { \
T tmp = x; \
x = y; \
y = tmp; \
} while (0)
◆ CDC_INIT_STRUCT
◆ CDC_STATIC_ASSERT
#define CDC_STATIC_ASSERT |
( |
|
COND, |
|
|
|
MSG |
|
) |
| typedef char cdc_static_assertion_##MSG[(COND) ? 1 : -1] |
◆ cdc_free_fn_t
typedef void(* cdc_free_fn_t) (void *) |
◆ cdc_unary_pred_fn_t
typedef int(* cdc_unary_pred_fn_t) (const void *) |
◆ cdc_binary_pred_fn_t
typedef int(* cdc_binary_pred_fn_t) (const void *, const void *) |
◆ cdc_copy_fn_t
typedef void(* cdc_copy_fn_t) (void *, const void *) |
◆ cdc_iterator_type
Enumerator |
---|
CDC_FWD_ITERATOR | |
CDC_BIDIR_ITERATOR | |
CDC_RA_ITERATOR | |
◆ cdc_up_to_pow2()
static size_t cdc_up_to_pow2 |
( |
size_t |
x | ) |
|
|
inlinestatic |