Namespaces
Variants

std:: operator==,!=,<,<=> (std::error_code)

From cppreference.net
Utilities library
헤더에 정의됨 <system_error>
bool operator == ( const std:: error_code & lhs,
const std:: error_code & rhs ) noexcept ;
(1) (C++11부터)
bool operator ! = ( const std:: error_code & lhs,
const std:: error_code & rhs ) noexcept ;
(2) (C++11부터)
(C++20까지)
bool operator < ( const std:: error_code & lhs,
const std:: error_code & rhs ) noexcept ;
(3) (C++11부터)
(C++20까지)
std:: strong_ordering operator <=> ( const std:: error_code & lhs,
const std:: error_code & rhs ) noexcept ;
(4) (C++20부터)

두 오류 코드 객체를 비교합니다.

1) lhs rhs 의 동등성을 비교합니다.
2) lhs rhs 의 동등성을 비교합니다.
3) lhs rhs 보다 작은지 확인합니다.
4) lhs rhs 의 삼방 비교 결과를 얻습니다.

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

(C++20부터)

매개변수

lhs, rhs - 비교할 오류 코드

반환값

1) true 오류 카테고리와 오류 값이 동일하게 비교되는 경우
2) true 오류 카테고리 또는 오류 값 비교가 같지 않은 경우.
3) true 만약 lhs. category ( ) < rhs. category ( ) . 그렇지 않으면, true 만약 lhs. category ( ) == rhs. category ( ) && lhs. value ( ) < rhs. value ( ) . 그렇지 않으면, false .
4) lhs. category ( ) <=> rhs. category ( ) 만약 그것이 std :: strong_ordering :: equal 가 아닌 경우. 그렇지 않으면, lhs. value ( ) <=> rhs. value ( ) .

참고 항목

이 error_code의 error_category를 획득함
(public member function)
error_code 의 값을 획득함
(public member function)
(removed in C++20) (removed in C++20) (C++20)
error_condition error_code 를 비교함
(function)