Reputation: 14859
Looking at the C++ RTTI and type_info class sometimes I find the description of a method called raw_name()
that is used to return the demangled name of a class. I cannot find any implementation in g++ but only the method name()
. Do you know whether that is an implementation specific only for Visual Studio/MS and and whether is part of the C++ standard?
Upvotes: 1
Views: 823
Reputation: 206498
It is implementation specific, type_info
is defined in the standard at:
C++03 Standard: 18.7.1 Class type_info:
namespace std {
class type_info {
public:
virtual ~type_info();
bool operator==(const type_info& rhs) const noexcept;
bool operator!=(const type_info& rhs) const noexcept;
bool before(const type_info& rhs) const noexcept;
size_t hash_code() const noexcept;
const char* name() const noexcept;
type_info(const type_info& rhs) = delete; // cannot be copied
type_info& operator=(const type_info& rhs) = delete; // cannot be copied
};
}
As you see raw_data
is not a standard defined class member.
Upvotes: 3
Reputation: 249093
A quick Google will show you that raw_name()
is only documented by Microsoft. It's not part of C++.
Upvotes: 3