.TH "std::error_code" 3cxx "Wed Jul 14 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::error_code .SH SYNOPSIS .br .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "template::value>::type> \fBerror_code\fP (_ErrorCodeEnum __e) noexcept" .br .ti -1c .RI "\fBerror_code\fP (int __v, const \fBerror_category\fP &__cat) noexcept" .br .ti -1c .RI "void \fBassign\fP (int __v, const \fBerror_category\fP &__cat) noexcept" .br .ti -1c .RI "const \fBerror_category\fP & \fBcategory\fP () const noexcept" .br .ti -1c .RI "void \fBclear\fP () noexcept" .br .ti -1c .RI "\fBerror_condition\fP \fBdefault_error_condition\fP () const noexcept" .br .ti -1c .RI "_GLIBCXX_DEFAULT_ABI_TAG \fBstring\fP \fBmessage\fP () const" .br .ti -1c .RI "\fBoperator bool\fP () const noexcept" .br .ti -1c .RI "template \fBenable_if\fP< \fBis_error_code_enum\fP< _ErrorCodeEnum >::value, \fBerror_code\fP & >::type \fBoperator=\fP (_ErrorCodeEnum __e) noexcept" .br .ti -1c .RI "int \fBvalue\fP () const noexcept" .br .in -1c .SS "Related Functions" (Note that these are not member functions\&.) .in +1c .ti -1c .RI "\fBerror_condition\fP \fBmake_error_condition\fP (errc) noexcept" .br .ti -1c .RI "bool \fBoperator!=\fP (const \fBerror_code\fP &__lhs, const \fBerror_code\fP &__rhs) noexcept" .br .ti -1c .RI "bool \fBoperator==\fP (const \fBerror_code\fP &__lhs, const \fBerror_code\fP &__rhs) noexcept" .br .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBerror_code\fP \fBmake_error_code\fP (errc __e) noexcept" .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 Definition at line 180 of file system_error\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.