29 #ifndef _GLIBCXX_TYPEINDEX
30 #define _GLIBCXX_TYPEINDEX 1
32 #pragma GCC system_header
34 #if __cplusplus < 201103L
39 #if __cplusplus > 201703L
43 namespace std _GLIBCXX_VISIBILITY(default)
45 _GLIBCXX_BEGIN_NAMESPACE_VERSION
58 : _M_target(&__rhs) { }
61 operator==(
const type_index& __rhs)
const noexcept
62 {
return *_M_target == *__rhs._M_target; }
64 #if ! __cpp_lib_three_way_comparison
66 operator!=(
const type_index& __rhs)
const noexcept
67 {
return *_M_target != *__rhs._M_target; }
71 operator<(
const type_index& __rhs)
const noexcept
72 {
return _M_target->before(*__rhs._M_target); }
75 operator<=(
const type_index& __rhs)
const noexcept
76 {
return !__rhs._M_target->before(*_M_target); }
79 operator>(
const type_index& __rhs)
const noexcept
80 {
return __rhs._M_target->before(*_M_target); }
83 operator>=(
const type_index& __rhs)
const noexcept
84 {
return !_M_target->before(*__rhs._M_target); }
86 #if __cpp_lib_three_way_comparison
88 operator<=>(
const type_index& __rhs)
const noexcept
90 if (*_M_target == *__rhs._M_target)
91 return strong_ordering::equal;
92 if (_M_target->before(*__rhs._M_target))
93 return strong_ordering::less;
94 return strong_ordering::greater;
99 hash_code()
const noexcept
100 {
return _M_target->hash_code(); }
103 name()
const noexcept
104 {
return _M_target->
name(); }
110 template<
typename _Tp>
struct hash;
116 typedef size_t result_type;
120 operator()(
const type_index& __ti)
const noexcept
121 {
return __ti.hash_code(); }
124 _GLIBCXX_END_NAMESPACE_VERSION
129 #endif // _GLIBCXX_TYPEINDEX
Primary class template hash.
Class type_indexThe class type_index provides a simple wrapper for type_info which can be used as an ...
const char * name() const noexcept