16#ifndef CCC_IMPL_BITSET
17#define CCC_IMPL_BITSET
51#define ccc_impl_bs_blocks(impl_bit_cap) \
52 (((impl_bit_cap) + ((sizeof(ccc_bitblock) * CHAR_BIT) - 1)) \
53 / (sizeof(ccc_bitblock) * CHAR_BIT))
56#define IMPL_BS_NON_IMPL_BS_DEFAULT_SIZE(impl_cap, ...) __VA_ARGS__
58#define IMPL_BS_DEFAULT_SIZE(impl_cap, ...) impl_cap
60#define IMPL_BS_OPTIONAL_SIZE(impl_cap, ...) \
61 __VA_OPT__(IMPL_BS_NON_)##IMPL_BS_DEFAULT_SIZE(impl_cap, __VA_ARGS__)
67#define ccc_impl_bs_init(impl_bitblock_ptr, impl_alloc_fn, impl_aux, impl_cap, \
70 .blocks = (impl_bitblock_ptr), \
71 .count = IMPL_BS_OPTIONAL_SIZE((impl_cap), __VA_ARGS__), \
72 .capacity = (impl_cap), \
73 .alloc = (impl_alloc_fn), \
ccc_bitblock ccc_bitblock
The type used to efficiently store bits in the bit set.
Definition: bitset.h:81
struct ccc_bitset ccc_bitset
The bit set type that may be stored and initialized on the stack, heap, or data segment at compile or...
Definition: bitset.h:73
void * ccc_any_alloc_fn(void *ptr, size_t size, void *aux)
An allocation function at the core of all containers.
Definition: types.h:312