Namespaces
Variants
Views
Actions

std::operator==,!=,<(std::error_code)

From cppreference.com
< cpp‎ | error‎ | error code
Revision as of 06:03, 2 December 2012 by P12 (Talk | contribs)

 
 
 
 
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <system_error>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td >
bool operator==( const error_code& lhs, const error_code& rhs );
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
bool operator!=( const error_code& lhs, const error_code& rhs );
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
bool operator<( const error_code& lhs, const error_code& rhs );
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Compares two error code objects.

1) Compares lhs and rhs for equality.
2) Compares lhs and rhs for equality.
3) Checks whether lhs is less than rhs.

Contents

Parameters

lhs, rhs - error codes to compare

Return value

1) true if the error category and error value compare equal.
2) true if the error category or error value compare are not equal.
3) true if lhs.category() < rhs.category(). Otherwise, true if lhs.category() == rhs.category() && lhs.value() < rhs.value(). Otherwise, false

Exceptions

noexcept specification:  
noexcept
  

See also

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