>>107849251
>I prefer C99. I have my own small std lib which implements all the useful standard data structures. Contiguous vector..
i didn't mean the c++ implementation, i meant one in c which is only slightly possible with preprocessor abuse. you have to call the macro to create the function and you can use ## to "inject" like this.
>>107849573
this is not what i mean at all. i mean how do u go about making it generic like the stl, which is only possible because of templates.
#define MAKE_ADD_FUNC(type) \
type add_##type(type a, type b) { \
return a + b; \
}
MAKE_ADD_FUNC(int)
MAKE_ADD_FUNC(double)