It is used to Concatenate "token" of text source: when the macro is expanded first the preprocessor substitute the variables name with their values and then concatenate tokens divided by ##
#define init_func(prefix_name, arg) prefix_name##_init(arg)so calling:
init_func(armadillo, null)expands in:
armadillo_init(null)fox!
Reference: http://gcc.gnu.org/onlinedocs/cpp/Concatenation.html#Concatenation
Nessun commento:
Posta un commento