Namespaces
Variants

std::error_category:: operator==,!=,<,<=>

From cppreference.net
Utilities library
std::error_category
Member functions
error_category::operator== error_category::operator!= error_category::operator< error_category::operator<=>
(until C++20) (until C++20) (C++20)
bool operator == ( const error_category & rhs ) const noexcept ;
(1) (C++11부터)
bool operator ! = ( const error_category & rhs ) const noexcept ;
(2) (C++11부터)
(C++20까지)
bool operator < ( const error_category & rhs ) const noexcept ;
(3) (C++11부터)
(C++20까지)
std:: strong_ordering operator <=> ( const error_category & rhs ) const noexcept ;
(4) (C++20부터)

다른 오류 카테고리와 비교합니다.

1) * this rhs 가 동일한 객체를 참조하는지 확인합니다.
2) * this rhs 가 동일한 객체를 참조하지 않는지 확인합니다.
3) * this rhs this & rhs 의 순서로 정렬합니다. std:: less < const error_category * > ( ) ( this, & rhs ) 와 동등합니다.
4) * this rhs this & rhs 의 순서로 정렬합니다. std:: compare_three_way ( ) ( this, & rhs ) 와 동등합니다.

< , <= , > , >= , 그리고 != 연산자들은 각각 operator <=> operator == 로부터 합성됩니다 .

(C++20부터)

매개변수

rhs - 비교할 error_category 를 지정합니다

반환값

1) true 만약 * this rhs 가 동일한 객체를 참조하면, false 그렇지 않으면.
2) true 만약 * this rhs 가 동일한 객체를 참조하지 않으면, false 그렇지 않으면.
3) true 를 반환합니다, 만약 * this rhs 보다 작은 경우로, this & rhs 의 순서에 따라 정의됩니다.
4) std :: strong_order :: less 만약 * this rhs 보다 작으면 (순서 정의에 따라), 그렇지 않으면 std :: strong_order :: greater 만약 rhs * this 보다 작으면, 그렇지 않으면 std :: strong_order :: equal .