32#pragma GCC system_header
35#if __cplusplus >= 201103L
39#define __glibcxx_want_constexpr_typeinfo
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
102 const char*
name() const _GLIBCXX_NOEXCEPT
103 {
return __name[0] ==
'*' ? __name + 1 : __name; }
110 bool operator==(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT;
112#if __cpp_impl_three_way_comparison < 201907L
113 bool operator!=(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT
114 {
return !operator==(__arg); }
117#if __cplusplus >= 201103L
118 size_t hash_code() const noexcept
120# if !__GXX_MERGED_TYPEINFO_NAMES
121 return _Hash_bytes(
name(), __builtin_strlen(
name()),
122 static_cast<size_t>(0xc70f6907UL));
124 return reinterpret_cast<size_t>(__name);
130 virtual bool __is_pointer_p()
const;
133 virtual bool __is_function_p()
const;
141 virtual bool __do_catch(
const type_info *__thr_type,
void **__thr_obj,
142 unsigned __outer)
const;
145 virtual bool __do_upcast(
const __cxxabiv1::__class_type_info *__target,
146 void **__obj_ptr)
const;
151 explicit type_info(
const char *__n): __name(__n) { }
155#if __cplusplus >= 201103L
156 type_info& operator=(
const type_info&) =
delete;
157 type_info(
const type_info&) =
delete;
159 type_info& operator=(
const type_info&);
160 type_info(
const type_info&);
163#if ! __GXX_TYPEINFO_EQUALITY_INLINE
164 bool __equal(
const type_info&)
const _GLIBCXX_NOEXCEPT;
168#if __GXX_TYPEINFO_EQUALITY_INLINE
172#if !__GXX_MERGED_TYPEINFO_NAMES
176 if (__name[0] !=
'*' || __arg.__name[0] !=
'*')
177 return __builtin_strcmp (__name, __arg.__name) < 0;
186 return __name < __arg.__name;
190#if __GXX_TYPEINFO_EQUALITY_INLINE || __cplusplus > 202002L
191 _GLIBCXX23_CONSTEXPR
inline bool
192 type_info::operator==(
const type_info& __arg)
const _GLIBCXX_NOEXCEPT
194 if (std::__is_constant_evaluated())
195 return this == &__arg;
197 if (__name == __arg.__name)
200#if !__GXX_TYPEINFO_EQUALITY_INLINE
202 return __equal(__arg);
203#elif !__GXX_MERGED_TYPEINFO_NAMES
205 return __name[0] !=
'*' && __builtin_strcmp (__name, __arg.name()) == 0;
222 bad_cast() _GLIBCXX_USE_NOEXCEPT { }
226 virtual ~bad_cast() _GLIBCXX_USE_NOEXCEPT;
229 virtual const char*
what() const _GLIBCXX_USE_NOEXCEPT;
246 virtual const char*
what() const _GLIBCXX_USE_NOEXCEPT;
252#pragma GCC visibility pop
ISO C++ entities toplevel namespace is std.
const char * name() const noexcept
bool before(const type_info &__arg) 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.