Is there a way to use something like std::is_base_of
based on the strings generated by typedid(...).name()
, and not on the types themselves?
In extenso, given something like:
class A {...};
class B: public A {...};
A a;
B b;
std::string sa = typeid(a).name;
std::string sb = typeid(b).name;
I would need something like this, at runtime:
if( std::is_base_of(sa, sb) )
{...}
This is related to object serialization in files.
Is there a way to perform this (without boost)?