Skip to content

Instantly share code, notes, and snippets.

@abissell
Last active January 3, 2016 02:29
Embed
What would you like to do?
// "chkd_array_factory_defs.h" -- second part
// Define the chkd_array functions for the passed-in types
#define DEFINE(TYPES) TYPES(CHKD_ARRAY_DEF)
DEFINE(CHKD_ARRAY_TYPES)
// Define the == is_equal function for passed-in primitive types
#define DEF_PRIMITIVES(TYPES) TYPES(IS_EQUAL_DEF)
DEF_PRIMITIVES(CHKD_ARRAY_PRIMITIVE_TYPES)
// An example definition of generic get function
#define CHKD_ARRAY_GET(CHKD_ARRAY_PTR, idx) \
GENERIC_ARRAY_PTR_FN_DEFINE((CHKD_ARRAY_PTR), get)((CHKD_ARRAY_PTR), idx)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment