std::type_index::operator==,!=,<,<=,>,>=,<=>
cppreference.net에서 가져옴
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
.