Namespaces
Variants

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

cppreference.net에서
 
 
유틸리티 라이브러리
일반 유틸리티
관계 연산자 (C++20에서 폐기됨)
정수 비교 함수
(C++20)(C++20)(C++20)    
(C++20)
스왑 및 형식 연산
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
공통 어휘 형식
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)



 
 
 
bool operator==( const std::error_condition& lhs,
                 const std::error_condition& rhs ) noexcept;
에 정의됨 (1) (C++11부터)
bool operator!=( const std::error_condition& lhs,
                 const std::error_condition& rhs ) noexcept;
(2) (C++11부터)
(C++20까지)
bool operator<( const std::error_condition& lhs,
                const std::error_condition& rhs ) noexcept;
(3) (C++11부터)
(C++20까지)
std::strong_ordering operator<=>( const std::error_condition& lhs,
                                  const std::error_condition& rhs ) noexcept;
(4) (C++20부터)
bool operator==( const std::error_code& code,
                 const std::error_condition& cond ) noexcept;
(5) (C++11부터)
bool operator==( const std::error_condition& cond,
                 const std::error_code& code ) noexcept;
(5) (C++11부터)
(C++20까지)
bool operator!=( const std::error_code& code,
                 const std::error_condition& cond ) noexcept;
(6) (C++11부터)
(C++20까지)
bool operator!=( const std::error_condition& cond,
                 const std::error_code& code ) noexcept;
(6) (C++11부터)
(C++20까지)

두 오류 조건을 비교합니다.

1) lhs과(와) rhs이(가) 같은지 확인합니다.
2) lhs과(와) rhs이(가) 같지 않은지 확인합니다.
3) lhs이(가) 보다 작은지 rhs 확인합니다.
4) lhs과(와) rhs의 삼방 비교 결과를 얻습니다.
5) code이(가) cond에 대한 의미상 일치인지 확인합니다.
6) code이(가) cond에 대한 의미상 일치가 아닌지 확인합니다.

<, <=, >, >= 및 != 연산자는 각각 과(와) 에서 operator<=>합성됩니다operator==.

(C++20부터)

매개변수

lhs, rhs, cond - 비교할 에러 조건
code - 비교할 에러 코드

반환값

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 ( ) .
5) true 를 반환하는 경우: code. category ( ) . equivalent ( code. value ( ) , cond ) 또는 cond. category ( ) . equivalent ( code, cond. value ( ) ) 가 참일 때.
6) true 를 반환합니다, 만약 code. category ( ) . equivalent ( code. value ( ) , cond ) 도 cond. category ( ) . equivalent ( code, cond. value ( ) ) 도 false인 경우.

참고 항목

[virtual]
error_code 와 error_condition 의 동등성을 비교합니다
( std::error_category 의 virtual public member function)
(C++20에서 제거됨) (C++20에서 제거됨) (C++20)
두 개의 error_code 를 비교합니다
(function)