You should check out <typeinfo>
header, there are some methods there which might be able to help you.
Example:
#include <typeinfo>
class Foo { };
int main() {
Foo foo;
string s = typeid(foo).name();
}
Live example
Have in mind, that output may differ when you use other compilers etc. since it's implementation-detail how to implement naming for types.
To circumvent this, you coul do some testing at initialization for used types and store results of name()
or hash_code()
methods of used types and then just check it at runtime. This way you get compiler-independent solution.