|
|
|
|
Member functions | ||||
error_code::operator= | ||||
Modifiers | ||||
Observers | ||||
Non-member functions | ||||
(until C++20)(until C++20)(C++20) | ||||
Helper classes | ||||
template<class ErrorCodeEnum> error_code& operator=( ErrorCodeEnum e)noexcept; | (1) | (since C++11) |
error_code& operator=(const error_code& other)=default; | (2) | (since C++11) (implicitly declared) |
error_code& operator=( error_code&& other)=default; | (3) | (since C++11) (implicitly declared) |
Equivalent to*this= make_error_code(e), wheremake_error_code
is only found byargument-dependent lookup.
Contents |
e | - | error code enum to construct |
other | - | another error code to assign with |
*this
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 3629 | C++11 | onlystd::make_error_code overloads were used | ADL-found overloads are used |
assigns another error code (public member function)[edit] |