The reason I want to understand it is that I'm going to make a DLL loader class like this:
class DymanicLibraryLoader
{
//some code
template <typename FnPtrT>
FnPtrT GetFunction(std::type_info& fn_type, std::string_view pretty_name)
{
//code
}
};
//...
DynamicLibrary dll {...};
typedef void (SomeClass::* FnPtr)(int);
std::type_info& fntype = typeid(FnPtr);
auto fnptr = dll.GetFunction(fntype, "function")
//...
Have you tried std::typeinfo::raw_name()
?