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; }
137 #if __cpp_impl_three_way_comparison < 201907L
138 bool operator!=(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT
139 {
return !operator==(__arg); }
142 #if __cplusplus >= 201103L
143 size_t hash_code() const noexcept
145 # if !__GXX_MERGED_TYPEINFO_NAMES
146 return _Hash_bytes(
name(), __builtin_strlen(
name()),
147 static_cast<size_t>(0xc70f6907UL));
149 return reinterpret_cast<size_t>(__name);
155 virtual bool __is_pointer_p()
const;
158 virtual bool __is_function_p()
const;
166 virtual bool __do_catch(
const type_info *__thr_type,
void **__thr_obj,
167 unsigned __outer)
const;
170 virtual bool __do_upcast(
const __cxxabiv1::__class_type_info *__target,
171 void **__obj_ptr)
const;
176 explicit type_info(
const char *__n): __name(__n) { }
180 type_info& operator=(
const type_info&);
181 type_info(
const type_info&);
193 bad_cast() _GLIBCXX_USE_NOEXCEPT { }
197 virtual ~
bad_cast() _GLIBCXX_USE_NOEXCEPT;
200 virtual const char*
what() const _GLIBCXX_USE_NOEXCEPT;
217 virtual const char*
what() const _GLIBCXX_USE_NOEXCEPT;
223 #pragma GCC visibility pop
ISO C++ entities toplevel namespace is std.
const char * name() const noexcept
Thrown during incorrect typecasting.
virtual const char * what() const noexcept
Thrown when a NULL pointer in a typeid expression is used.
virtual const char * what() const noexcept
Base class for all library exceptions.