template< class ErrorCodeEnum >
error_code& operator=( ErrorCodeEnum e ) noexcept;
error_code& operator=( const error_code& other ) = default;
(2) (since C++11)error_code& operator=( error_code&& other ) = default;
(3) (since C++11)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<ErrorCodeEnum>::valueis
true.
2,3) Implicitly defined copy-assignment operator and move-assignment operator assign the contents of other to *this.
[edit] Parameters e - error code enum to construct other - another error code to assign with [edit] Return value*this
[edit] Defect reportsThe 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 [edit] See also assigns another error code
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4