std::error_code (3) - Linux Man Pages

std::error_code: std::error_code

NAME

std::error_code - std::error_code

Synopsis


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 an 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


                        constructs an error code
constructor (public member function)
                        assigns another error code
operator= (public member function)
                        assigns another error code
assign (public member function)

Modifiers


                        sets the error_code to value 0 in system_category
clear (public member function)

Observers


                        obtains the value of the error_code
value (public member function)
                        obtains the error_category for this error_code
category (public member function)
                        obtains the error_condition for this error_code
default_error_condition (public member function)
                        obtains the explanatory string for this error_code
message (public member function)
                        checks if the value is non-zero
operator_bool (public member function)

Non-member functions


operator== compares two error_codes
operator!= (function)
operator<
           outputs the value and the category name to an output stream
operator<< (function)

Helper classes


is_error_code_enum identifies a class as an error_code enumeration
                           (class template)
(C++11)


std::hash<std::error_code> hash support for std::error_code
                           (class template specialization)
(C++11)

See also


error_condition holds a portable error code
                (class)
(C++11)


error_category base class for error categories
                (class)
(C++11)