public member function
<typeindex>

std::type_index::operator

(1)
bool operator== (const type_index& rhs) const noexcept;
(2)
bool operator!= (const type_index& rhs) const noexcept;
(3)
bool operator<  (const type_index& rhs) const noexcept;
(4)
bool operator<= (const type_index& rhs) const noexcept;
(5)
bool operator>  (const type_index& rhs) const noexcept;
(6)
bool operator>= (const type_index& rhs) const noexcept;
type_index operators
type_index 物件與 rhs 進行比較。

對於相等和不等比較(==!=),該函式直接在其引用的 type_info 物件上使用相同的運算子(參見 type_info::operator==)。

對於其他關係運算符,該函式使用 type_info::before 來確定它們的相對順序。

另請注意,賦值運算子 是隱式宣告的,複製物件保留的內部引用。

引數

rhs
運算子右側的 type_index 物件。

返回值

如果條件成立,則為 true
否則返回 false

資料競爭

這些成員函式不會引發資料競爭。

異常安全

無異常保證: 絕不丟擲異常。

另見