std::error_condition:: operator=
From cppreference.net
<
cpp
|
error
|
error condition
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diagnostics library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::error_condition
| Member functions | ||||
|
error_condition::operator=
|
||||
| Non-member functions | ||||
|
(until C++20)
(until C++20)
(C++20)
|
||||
| Helper classes | ||||
|
template
<
class
ErrorConditionEnum
>
error_condition & operator = ( ErrorConditionEnum e ) noexcept ; |
(1) | (C++11부터) |
|
error_condition
&
operator
=
(
const
error_condition
&
other
)
=
default
;
|
(2) |
(C++11부터)
(암시적으로 선언됨) |
|
error_condition
&
operator
=
(
error_condition
&&
other
)
=
default
;
|
(3) |
(C++11부터)
(암시적으로 선언됨) |
오류 조건에 내용을 할당합니다.
1)
enum
e
에 대한 오류 조건을 할당합니다. 효과적으로
e
에 대한
인수 종속 lookup
으로만 찾을 수 있는
make_error_condition
를 호출한 다음
*
this
를 결과로 대체합니다. 이 오버로드는
std::
is_error_condition_enum
<
ErrorConditionEnum
>
::
value
가
true
인 경우에만 오버로드 해결에 참여합니다.
2,3)
암시적으로 정의된 복사 할당 연산자와 이동 할당 연산자는
other
의 내용을
*
this
에 할당합니다.
매개변수
| e | - | 오류 조건 열거형 |
| other | - | 할당할 다른 오류 조건 |
반환값
* this .
결함 보고서
다음의 동작 변경 결함 보고서들은 이전에 발표된 C++ 표준에 소급 적용되었습니다.
| DR | 적용 대상 | 게시된 동작 | 올바른 동작 |
|---|---|---|---|
| LWG 3629 | C++11 |
std::make_error_condition
오버로드만 사용됨
|
ADL로 찾은 오버로드가 사용됨 |