34 #pragma GCC system_header
37 #ifdef __GXX_EXPERIMENTAL_CXX0X__
41 #pragma GCC visibility push(default)
47 class __class_type_info;
68 #ifndef __GXX_MERGED_TYPEINFO_NAMES
70 #define __GXX_MERGED_TYPEINFO_NAMES 0
74 #ifndef __GXX_TYPEINFO_EQUALITY_INLINE
76 #define __GXX_TYPEINFO_EQUALITY_INLINE 0
78 #define __GXX_TYPEINFO_EQUALITY_INLINE 1
102 {
return __name[0] ==
'*' ? __name + 1 : __name; }
104 #if !__GXX_TYPEINFO_EQUALITY_INLINE
108 bool before(
const type_info& __arg)
const;
109 bool operator==(
const type_info& __arg)
const;
111 #if !__GXX_MERGED_TYPEINFO_NAMES
117 bool before(
const type_info& __arg)
const
118 {
return (__name[0] ==
'*' && __arg.__name[0] ==
'*')
119 ? __name < __arg.__name
120 : __builtin_strcmp (__name, __arg.__name) < 0; }
122 bool operator==(
const type_info& __arg)
const
124 return ((__name == __arg.__name)
125 || (__name[0] !=
'*' &&
126 __builtin_strcmp (__name, __arg.__name) == 0));
131 bool before(
const type_info& __arg)
const
132 {
return __name < __arg.__name; }
134 bool operator==(
const type_info& __arg)
const
135 {
return __name == __arg.__name; }
138 bool operator!=(
const type_info& __arg)
const
139 {
return !operator==(__arg); }
141 #ifdef __GXX_EXPERIMENTAL_CXX0X__
142 size_t hash_code() const noexcept
144 # if !__GXX_MERGED_TYPEINFO_NAMES
145 return _Hash_bytes(
name(), __builtin_strlen(
name()),
146 static_cast<size_t>(0xc70f6907UL));
148 return reinterpret_cast<size_t>(__name);
151 #endif // __GXX_EXPERIMENTAL_CXX0X__
154 virtual bool __is_pointer_p()
const;
157 virtual bool __is_function_p()
const;
165 virtual bool __do_catch(
const type_info *__thr_type,
void **__thr_obj,
166 unsigned __outer)
const;
169 virtual bool __do_upcast(
const __cxxabiv1::__class_type_info *__target,
170 void **__obj_ptr)
const;
175 explicit type_info(
const char *__n): __name(__n) { }
179 type_info& operator=(
const type_info&);
180 type_info(
const type_info&);
192 bad_cast() _GLIBCXX_USE_NOEXCEPT { }
196 virtual ~
bad_cast() _GLIBCXX_USE_NOEXCEPT;
199 virtual const char*
what()
const _GLIBCXX_USE_NOEXCEPT;
216 virtual const char*
what()
const _GLIBCXX_USE_NOEXCEPT;
222 #pragma GCC visibility pop
const char * name() const
virtual const char * what() const _GLIBCXX_USE_NOEXCEPT
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.
Thrown when a NULL pointer in a typeid expression is used.
virtual const char * what() const _GLIBCXX_USE_NOEXCEPT