public member function
<system_error>

std::關係運算符 (error_category)

(1)
bool operator== (const error_category& rhs) const noexcept;
(2)
bool operator!= (const error_category& rhs) const noexcept;
(3)
bool operator<  (const error_category& rhs) const noexcept;
關係運算符
這些成員函式比較兩個 error_category 物件是否相同。

只有當兩個 error_category 物件在記憶體中具有相同的地址時,它們才相等
1
this == &

小於關係運算符 (3) 返回左側運算元是否引用一個物件,該物件的引用在指標的總排序中位於 rhs 之前,就像定義為
1
2
3
bool error_category::operator< (const error_category& rhs) const noexcept {
  return less <const error_category*>()(this,&rhs);
}

引數

rhs
另一個 error_category 物件。

返回值

如果兩個物件相同,則返回true,否則返回false