34 #pragma GCC system_header
37 #ifdef __GXX_EXPERIMENTAL_CXX0X__
42 #pragma GCC visibility push(default)
48 class __class_type_info;
69 #ifndef __GXX_MERGED_TYPEINFO_NAMES
71 #define __GXX_MERGED_TYPEINFO_NAMES 0
75 #ifndef __GXX_TYPEINFO_EQUALITY_INLINE
77 #define __GXX_TYPEINFO_EQUALITY_INLINE 0
79 #define __GXX_TYPEINFO_EQUALITY_INLINE 1
103 {
return __name[0] ==
'*' ? __name + 1 : __name; }
105 #if !__GXX_TYPEINFO_EQUALITY_INLINE
109 bool before(
const type_info& __arg)
const;
110 bool operator==(
const type_info& __arg)
const;
112 #if !__GXX_MERGED_TYPEINFO_NAMES
118 bool before(
const type_info& __arg)
const
119 {
return (__name[0] ==
'*' && __arg.__name[0] ==
'*')
120 ? __name < __arg.__name
121 : __builtin_strcmp (__name, __arg.__name) < 0; }
123 bool operator==(
const type_info& __arg)
const
125 return ((__name == __arg.__name)
126 || (__name[0] !=
'*' &&
127 __builtin_strcmp (__name, __arg.__name) == 0));
132 bool before(
const type_info& __arg)
const
133 {
return __name < __arg.__name; }
135 bool operator==(
const type_info& __arg)
const
136 {
return __name == __arg.__name; }
139 bool operator!=(
const type_info& __arg)
const
140 {
return !operator==(__arg); }
142 #ifdef __GXX_EXPERIMENTAL_CXX0X__
143 size_t hash_code()
const throw()
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);
152 #endif // __GXX_EXPERIMENTAL_CXX0X__
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&);
200 virtual const char*
what()
const throw();
217 virtual const char*
what()
const throw();
221 #pragma GCC visibility pop
const char * name() const
Thrown when a NULL pointer in a typeid expression is used.
Base class for all library exceptions.
virtual const char * what() const
virtual const char * what() const
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.