32 #pragma GCC system_header 35 #if __cplusplus >= 201103L 39 #pragma GCC visibility push(default) 45 class __class_type_info;
66 #ifndef __GXX_MERGED_TYPEINFO_NAMES 68 #define __GXX_MERGED_TYPEINFO_NAMES 0 72 #ifndef __GXX_TYPEINFO_EQUALITY_INLINE 74 #define __GXX_TYPEINFO_EQUALITY_INLINE 0 76 #define __GXX_TYPEINFO_EQUALITY_INLINE 1 99 const char*
name() const _GLIBCXX_NOEXCEPT
100 {
return __name[0] ==
'*' ? __name + 1 : __name; }
102 #if !__GXX_TYPEINFO_EQUALITY_INLINE 106 bool before(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT;
107 bool operator==(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT;
109 #if !__GXX_MERGED_TYPEINFO_NAMES 115 bool before(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT
116 {
return (__name[0] ==
'*' && __arg.__name[0] ==
'*')
117 ? __name < __arg.__name
118 : __builtin_strcmp (__name, __arg.__name) < 0; }
120 bool operator==(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT
122 return ((__name == __arg.__name)
123 || (__name[0] !=
'*' &&
124 __builtin_strcmp (__name, __arg.__name) == 0));
129 bool before(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT
130 {
return __name < __arg.__name; }
132 bool operator==(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT
133 {
return __name == __arg.__name; }
136 bool operator!=(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT
137 {
return !operator==(__arg); }
139 #if __cplusplus >= 201103L 140 size_t hash_code()
const noexcept
142 # if !__GXX_MERGED_TYPEINFO_NAMES 143 return _Hash_bytes(name(), __builtin_strlen(name()),
144 static_cast<size_t>(0xc70f6907UL));
146 return reinterpret_cast<size_t>(__name);
152 virtual bool __is_pointer_p()
const;
155 virtual bool __is_function_p()
const;
163 virtual bool __do_catch(
const type_info *__thr_type,
void **__thr_obj,
164 unsigned __outer)
const;
167 virtual bool __do_upcast(
const __cxxabiv1::__class_type_info *__target,
168 void **__obj_ptr)
const;
173 explicit type_info(
const char *__n): __name(__n) { }
190 bad_cast() _GLIBCXX_USE_NOEXCEPT { }
194 virtual ~
bad_cast() _GLIBCXX_USE_NOEXCEPT;
197 virtual const char* what()
const _GLIBCXX_USE_NOEXCEPT;
214 virtual const char* what()
const _GLIBCXX_USE_NOEXCEPT;
220 #pragma GCC visibility pop const char * name() const noexcept
ISO C++ entities toplevel namespace is std.
Thrown when a NULL pointer in a typeid expression is used.
Base class for all library exceptions.
Thrown during incorrect typecasting.If you attempt an invalid dynamic_cast expression, an instance of this class (or something derived from this class) is thrown.