Namespaces
Variants
Views
Actions

std::error_code::operator=

From cppreference.com
< cpp‎ | error‎ | error code
Revision as of 16:12, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
 
 

Template:ddcl list begin <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
template< class ErrorCodeEnum >
error_code& operator=( ErrorCodeEnum e );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Replaces the error code and corresponding category with those representing error code enum e.

Equivalent to *this = std::make_error_code(e). The overload participates in overload resolutions only if std::is_error_code_enum<ErrorCodeEnum>::value == true.

Contents

Parameters

e - error code enum to construct

Return value

*this

Exceptions

noexcept specification:  
noexcept
  

Notes

Copy-assignment operator is defined implicitly.

See also

Template:cpp/error/error code/dcl list assign