std::type_index::operator==,!=,<,<=,>,>=,<=>
来自cppreference.com
| |
(1) | (C++11 起) |
| |
(2) | (C++11 起) (C++20 前) |
| |
(3) | (C++11 起) |
| |
(4) | (C++11 起) |
| |
(5) | (C++11 起) |
| |
(6) | (C++11 起) |
| |
(7) | (C++20 起) |
比较底层 std::type_info 对象。
1,2) 检查底层的 std::type_info 对象是否代表同一类型。
|
|
(C++20 起) |
参数
| rhs | - | 要比较的另一 type_index 对象
|
返回值
1) 若底层 std::type_info 对象表示同一类型则为
true,否则为 false。2) 若底层 std::type_info 对象不表示同一类型则为
true,否则为 false。3-6) 若底层 std::type_info 所表示的类型按对应顺序排列,则为
true,否则为 false。7) 若底层 std::type_info 对象表示同一类型则为
std::strong_ordering::equal,否则若 *this 的底层 std::type_info 对象在实现定义顺序中前趋 rhs 的则为 std::strong_ordering::less,否则为 std::strong_ordering::greater。