2 ms·
No love for the "implementation in a .h file that you include multiple times" approach? e.g. #define GENERIC_VECTOR_TYPE struct foo #define GENERIC_VECT
by aidenn0 1y ago
No 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.