3 ms·
I do (type-safe) container types in C
- aidenn0 1y agoNo love for the "implementation in a .h file that you include multiple times" approach? e.g. #define GENERIC_VECTOR_TYPE struct foo #define GENERIC_VECTOR_NAME struct_foo #include <generic_vector.h> It's possible to make include guards that prevent it from being included multiple times with the same name, and it prevents having function definitions being inside macro expansions.