This is kind of a follow-up question to one of my old questions here. I found some code that goes like this:
#define TYPESUPPORT(T) \
... \
static const char* get_type_name() \
{ \
return #T; \
} \
...
Where T is a variable type (e.g. int). #T is used to get the plaintext name of the macro input.
Is this safe to do? As in, how is #T allocated? Does it allocate a const char* or const char[] string literal, like in my first question, for each macro call or something?
return "int";abi::__cxa_demangle.