Example code emulating c++ templates in c using macros