Class to represent an error code value. More...
#include <error_code.hpp>
Classes | |
struct | unspecified_bool_type_t |
Public Types | |
typedef void(* | unspecified_bool_type )(unspecified_bool_type_t) |
typedef int | value_type |
The underlying representation of an error code. | |
Public Member Functions | |
error_category | category () const |
Get the error category. | |
error_code () | |
Default constructor. | |
error_code (value_type v, error_category c) | |
Construct with specific error code and category. | |
template<typename ErrorEnum > | |
error_code (ErrorEnum e) | |
Construct from an error code enum. | |
std::string | message () const |
Get the message associated with the error. | |
operator unspecified_bool_type () const | |
Operator returns non-null if there is a non-success error code. | |
bool | operator! () const |
Operator to test if the error represents success. | |
value_type | value () const |
Get the error value. | |
Static Public Member Functions | |
static void | unspecified_bool_true (unspecified_bool_type_t) |
Private Attributes | |
error_category | category_ |
value_type | value_ |
Friends | |
bool | operator!= (const error_code &e1, const error_code &e2) |
Inequality operator to compare two error objects. | |
bool | operator== (const error_code &e1, const error_code &e2) |
Equality operator to compare two error objects. |
Class to represent an error code value.
Definition at line 69 of file error_code.hpp.
typedef void(* asio::error_code::unspecified_bool_type)(unspecified_bool_type_t) |
Definition at line 115 of file error_code.hpp.
typedef int asio::error_code::value_type |
The underlying representation of an error code.
Definition at line 73 of file error_code.hpp.
asio::error_code::error_code | ( | ) | [inline] |
Default constructor.
Definition at line 76 of file error_code.hpp.
asio::error_code::error_code | ( | value_type | v, |
error_category | c | ||
) | [inline] |
Construct with specific error code and category.
Definition at line 83 of file error_code.hpp.
asio::error_code::error_code | ( | ErrorEnum | e | ) | [inline] |
Construct from an error code enum.
Definition at line 91 of file error_code.hpp.
error_category asio::error_code::category | ( | ) | const [inline] |
Get the error category.
Definition at line 103 of file error_code.hpp.
std::string asio::error_code::message | ( | ) | const |
Get the message associated with the error.
asio::error_code::operator unspecified_bool_type | ( | ) | const [inline] |
Operator returns non-null if there is a non-success error code.
Definition at line 122 of file error_code.hpp.
bool asio::error_code::operator! | ( | ) | const [inline] |
Operator to test if the error represents success.
Definition at line 131 of file error_code.hpp.
static void asio::error_code::unspecified_bool_true | ( | unspecified_bool_type_t | ) | [inline, static] |
Definition at line 117 of file error_code.hpp.
value_type asio::error_code::value | ( | ) | const [inline] |
Get the error value.
Definition at line 97 of file error_code.hpp.
bool operator!= | ( | const error_code & | e1, |
const error_code & | e2 | ||
) | [friend] |
Inequality operator to compare two error objects.
Definition at line 143 of file error_code.hpp.
bool operator== | ( | const error_code & | e1, |
const error_code & | e2 | ||
) | [friend] |
Equality operator to compare two error objects.
Definition at line 137 of file error_code.hpp.
error_category asio::error_code::category_ [private] |
Definition at line 153 of file error_code.hpp.
value_type asio::error_code::value_ [private] |
Definition at line 150 of file error_code.hpp.