Welcome back to the 80's, where C++ used to play with macro to make templates and inheritance was only a basic compiler trick.
I can only emphasizes the need to move to real C++ if you want to use C++ idioms, to do it safely and performances wise: here you just opened the gate of Macro error's hell which will be more horrible than anything the C++ could throw at you.