Suppose I have either:
- A
boost::anyor - An
std::any(and I'm using C++17)
the type of which I don't know. Is it possible for me to print, or get as a string, the name of the type that's being held by the any?
Note: Even a mangled type name - the kind you get with typeid(TR).name() - would be sufficient I can take it from there using abi::__cxa_demangle.
Output:
class TestNamespace::TestOh and at least in msvc, the type_info for a std template library class looks a lot uglier than say
std::string(looks like:class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)