operator==,!=,<,<=> (std::error_condition)
From cppreference.net
<
cpp
|
error
|
error condition
|
헤더 파일에 정의됨
<system_error>
|
||
|
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
연산자
<=>
(
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 & condition ) 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
와 의미적으로 일치하지 않는지 확인합니다.
|
|
(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) |