std::error_code::operator=
Min standard notice:
- Replaces the error code and corresponding category with those representing error code enum e.
Equivalent to *this = make_error_code(e), where make_error_code is only found by argument-dependent lookup.
This overload participates in overload resolution only if std::is_error_code_enum
::value is true.
# Declarations
template< class ErrorCodeEnum >
error_code& operator=( ErrorCodeEnum e ) noexcept;
(since C++11)
error_code& operator=( const error_code& other ) = default;
(since C++11) (implicitly declared)
error_code& operator=( error_code&& other ) = default;
(since C++11) (implicitly declared)
# Parameters
e: error code enum to constructother: another error code to assign with
# Return value
*this
# Defect reports
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 3629 | C++11 | only std::make_error_code overloads were used | ADL-found overloads are used |