std::error_code::operator bool

explicit operator bool() const; (since C++11) Checks if the error value is valid, i.e. non-zero. Parameters (none). Return value false if value() == 0, true otherwise. Exceptions noexcept specification: noexcept

std::error_code::message

std::string message() const; (since C++11) Returns the message corresponding to the current error value and category. Equivalent to category().message(value()). Parameters (none). Return value The error message corresponding to the current error value and category. Exceptions (none).

std::error_code::error_code

error_code(); (1) (since C++11) error_code( int ec, const error_category& ecat ); (2) (since C++11) template< class ErrorCodeEnum > error_code( ErrorCodeEnum e ); (3) (since C++11) Constructs new error code. 1) Constructs error code with default value. Equivalent to error_code(0, std::system_category()). 2) Constructs error code with ec as the platform-dependent error code and ecat as the corresponding error category. 3) Constructs error code from an error code

std::error_code::default_error_condition

std::error_condition default_error_condition() const; (since C++11) Returns the default error condition for the current error value. Equivalent to category().default_error_condition(value()). Parameters (none). Return value The default error condition for the current error value. Exceptions noexcept specification: noexcept

std::error_code::clear

void clear(); (since C++11) Replaces the error code and error category with default values. Equivalent to *this = error_code(0, std::system_category()). Parameters (none). Return value (none). Exceptions noexcept specification: noexcept

std::error_code::category

const std::error_category& category() const; (since C++11) Returns the error category of the error value. Parameters (none). Return value The error category of the error value. Exceptions noexcept specification: noexcept See also value obtains the value of the error_code (public member function)

std::error_code::assign

void assign( int ec, const error_category& ecat ); (since C++11) Replaces the contents with error code ec and corresponding category ecat. Parameters ec - platform-dependent error code enum to assign ecat - error category corresponding to ec Return value (none). Exceptions noexcept specification: noexcept See also operator= assigns another error code (public member function)

std::error_code

Defined in header <system_error> class error_code; (since C++11) std::error_code is a platform-dependent error code. Each std::error_code object holds a pair of error code originating from the operating system, or some low-level interface and a pointer to an object of type std::error_category, which corresponds to the said interface. The error code values may be not unique across different error categories. Member functions (constructor) constructs an error code (pub

std::error_category::operators

bool operator==( const error_category& rhs ) const; (1) (since C++11) bool operator!=( const error_category& rhs ) const; (2) (since C++11) bool operator<( const error_category& rhs ) const; (3) (since C++11) Compares to another error category. 1) Checks whether *this and rhs refer to the same object. 2) Checks whether *this and rhs do not refer to the same object. 3) Orders *this and rhs by the order of this and &rhs. Equivalent to std::less<const e

std::error_category::name

virtual const char* name() const = 0; (since C++11) Returns a pointer to a null-terminated byte string that specifies the name of the error category. Parameters (none). Return value Null-terminated byte string specifying the name of the error category. Exceptions noexcept specification: noexcept