All I'm trying to do is use a macro to generate class names, it needs a bit of concat, and that's it. Except it fails miserably. This is really grinding my gears.
I have a macro defined before somewhere...
#define CLASSNAME myclassname
...
and I'm trying to get a generated classname with a type...
#define GETNAME(x) x
#define UNIQUENAME(T) GETNAME(CLASSNAME) ## _ ## T
UNIQUENAME(int) //I want it to make: myclassname_int
// instead it makes: myclassname _int
// SUBTLE, but screws everything up! can't have that space in the middle.
I checked another configuration...
#define UNIQUENAME(T) GETNAME(CLASSNAME)M ## M_ ## T
//which returns: myclassname MM_int
So the space definitely comes from the GETNAME result. Only thing is, I have no clue how to get rid of it. I've tried for way too long now.
Anything will help. Thanks!