std::operator==,!=,<,<=>(std::error_code)
cppreference.net에서 가져옴
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의 삼방 비교 결과를 얻습니다.|
|
(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) |