.TH "std::error_code" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::error_code .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "template<\fBtypename\fP \fB_ErrorCodeEnum\fP , \fBtypename\fP = typename enable_if::value>::type> \fBerror_code\fP (\fB_ErrorCodeEnum\fP __e) \fBnoexcept\fP" .br .ti -1c .RI "\fBerror_code\fP (int \fB__v\fP, \fBconst\fP \fBerror_category\fP &\fB__cat\fP) \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBassign\fP (int \fB__v\fP, \fBconst\fP \fBerror_category\fP &\fB__cat\fP) \fBnoexcept\fP" .br .ti -1c .RI "\fBconst\fP \fBerror_category\fP & \fBcategory\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBclear\fP () \fBnoexcept\fP" .br .ti -1c .RI "\fBerror_condition\fP \fBdefault_error_condition\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBstring\fP \fBmessage\fP () \fBconst\fP" .br .ti -1c .RI "\fBoperator bool\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "template<\fBtypename\fP \fB_ErrorCodeEnum\fP > \fBenable_if\fP< \fBis_error_code_enum\fP< \fB_ErrorCodeEnum\fP >::value, \fBerror_code\fP & >::type \fBoperator=\fP (\fB_ErrorCodeEnum\fP __e) \fBnoexcept\fP" .br .ti -1c .RI "int \fBvalue\fP () \fBconst\fP \fBnoexcept\fP" .br .in -1c .SS "Related Symbols" (Note that these are not member symbols\&.) .in +1c .ti -1c .RI "\fBerror_condition\fP \fBmake_error_condition\fP (errc) \fBnoexcept\fP" .br .ti -1c .RI "bool \fBoperator!=\fP (\fBconst\fP \fBerror_code\fP &\fB__lhs\fP, \fBconst\fP \fBerror_code\fP &\fB__rhs\fP) \fBnoexcept\fP" .br .ti -1c .RI "bool \fBoperator!=\fP (\fBconst\fP \fBerror_code\fP &\fB__lhs\fP, \fBconst\fP \fBerror_condition\fP &\fB__rhs\fP) \fBnoexcept\fP" .br .ti -1c .RI "bool \fBoperator==\fP (\fBconst\fP \fBerror_code\fP &\fB__lhs\fP, \fBconst\fP \fBerror_code\fP &\fB__rhs\fP) \fBnoexcept\fP" .br .ti -1c .RI "bool \fBoperator==\fP (\fBconst\fP \fBerror_code\fP &\fB__lhs\fP, \fBconst\fP \fBerror_condition\fP &\fB__rhs\fP) \fBnoexcept\fP" .br .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBerror_code\fP \fBmake_error_code\fP (errc __e) \fBnoexcept\fP" .br .in -1c .in -1c .SH "Detailed Description" .PP Class error_code .PP This class is a value type storing an integer error number and a category that gives meaning to the error number\&. Typically this is done close the the point where the error happens, to capture the original error value\&. .PP An \fCerror_code\fP object can be used to store the original error value emitted by some subsystem, with a category relevant to the subsystem\&. For example, errors from POSIX library functions can be represented by an \fCerrno\fP value and the 'generic' category, but errors from an HTTP library might be represented by an HTTP response status code (e\&.g\&. 404) and a custom category defined by the library\&. .PP \fBSince\fP .RS 4 C++11 .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.