Hello, I have question regarding macros. How could I cast through macro a template class to normal class. In example:
#define RUNTIME_CLASS(class_name) ((CRuntimeClass*)(&class##class_name))
template<typename T> A {};
if (RUNTIME_CLASS(A));
I know that this code woun't compile because it will not see template bit. But I don't understand the actual macro. the return of it looks like (CRuntimeClass*)(&classA)
Why ## concatenate makes class + A ? and how preprocessor understands such notation? Thanks ALOT!