std::type_index:: operator==,!=,<,<=,>,>=,<=>
From cppreference.net
<
cpp
|
types
|
type index
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type support
| Basic types | |||||||||||||||||||||
| Fixed width integer types (C++11) | |||||||||||||||||||||
| Fixed width floating-point types (C++23) | |||||||||||||||||||||
|
|||||||||||||||||||||
| Numeric limits | |||||||||||||||||||||
| C numeric limits interface | |||||||||||||||||||||
| Runtime type information | |||||||||||||||||||||
|
|||||||||||||||||||||
std::type_index
| Member functions | ||||
|
type_index::operator=
type_index::operator!=
type_index::operator<
type_index::operator<=
type_index::operator>
type_index::operator>=
type_index::operator<=>
(until C++20)
(C++20)
|
||||
| Helper classes | ||||
|
(C++11)
|
|
bool
operator
==
(
const
type_index
&
rhs
)
const
noexcept
;
|
(1) | (C++11부터) |
|
bool
operator
!
=
(
const
type_index
&
rhs
)
const
noexcept
;
|
(2) |
(C++11부터)
(C++20까지) |
|
bool
operator
<
(
const
type_index
&
rhs
)
const
noexcept
;
|
(3) | (C++11부터) |
|
bool
operator
<=
(
const
type_index
&
rhs
)
const
noexcept
;
|
(4) | (C++11부터) |
|
bool
operator
>
(
const
type_index
&
rhs
)
const
noexcept
;
|
(5) | (C++11부터) |
|
bool
operator
>=
(
const
type_index
&
rhs
)
const
noexcept
;
|
(6) | (C++11부터) |
|
std::
strong_ordering
operator
<=>
(
const
type_index
&
rhs
)
const
noexcept
;
|
(7) | (C++20부터) |
기반 std::type_info 객체들을 비교합니다.
1,2)
기본
std::type_info
객체들이 동일한 타입을 참조하는지 확인합니다.
|
|
(C++20부터) |
매개변수
| rhs | - |
비교할 다른
type_index
객체
|
반환값
7)
std
::
strong_ordering
::
equal
기본
std::type_info
객체들이 동일한 타입을 참조하는 경우, 그렇지 않으면
std
::
strong_ordering
::
less
*
this
의 기본
std::type_info
객체가 구현 정의 순서에서
rhs
의 객체보다 앞서는 경우, 그렇지 않으면
std
::
strong_ordering
::
greater
.