.TH "std::error_category" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::error_category .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBerror_category\fP (const \fBerror_category\fP &)=\fBdelete\fP" .br .ti -1c .RI "\fBvirtual\fP \fBerror_condition\fP \fBdefault_error_condition\fP (int __i) const noexcept" .br .RI "Return an error_condition corresponding to \fCi\fP in this category\&. " .ti -1c .RI "\fBvirtual\fP bool \fBequivalent\fP (const \fBerror_code\fP &\fB__code\fP, int __i) const noexcept" .br .RI "Test whether \fCcode\fP corresponds to \fCi\fP for this category\&. " .ti -1c .RI "\fBvirtual\fP bool \fBequivalent\fP (int __i, const \fBerror_condition\fP &\fB__cond\fP) const noexcept" .br .RI "Test whether \fCcond\fP corresponds to \fCi\fP for this category\&. " .ti -1c .RI "\fBvirtual\fP \fBstring\fP \fBmessage\fP (int) const =0" .br .ti -1c .RI "\fBvirtual\fP const char * \fBname\fP () const noexcept=0" .br .RI "A string that identifies the error category\&. " .ti -1c .RI "bool \fBoperator!=\fP (const \fBerror_category\fP &__other) const noexcept" .br .ti -1c .RI "bool \fBoperator<\fP (const \fBerror_category\fP &__other) const noexcept" .br .RI "Ordered comparison that defines a total order for error categories\&. " .ti -1c .RI "\fBerror_category\fP & \fBoperator=\fP (const \fBerror_category\fP &)=\fBdelete\fP" .br .ti -1c .RI "bool \fBoperator==\fP (const \fBerror_category\fP &__other) const noexcept" .br .RI "An error_category only compares equal to itself\&. " .in -1c .SH "Detailed Description" .PP Abstract base class for types defining a category of error codes\&. .PP An error category defines a context that gives meaning to the integer stored in an \fCerror_code\fP or \fCerror_condition\fP object\&. For example, the standard \fCerrno\fP constants such a \fCEINVAL\fP and \fCENOMEM\fP are associated with the 'generic' category and other OS-specific error numbers are associated with the 'system' category, but a user-defined category might give different meanings to the same numerical values\&. .PP A user-defined category can override the \fCequivalent\fP member functions to define correspondence between errors in different categories\&. For example, a category for errors from disk I/O could consider some of its error numbers equivalent to ENOSPC and ENOENT in the generic category\&. .PP \fBSince\fP .RS 4 C++11 .RE .PP .SH "Member Function Documentation" .PP .SS "\fBvirtual\fP \fBerror_condition\fP std::error_category::default_error_condition (int __i) const\fC [virtual]\fP, \fC [noexcept]\fP" .PP Return an error_condition corresponding to \fCi\fP in this category\&. .SS "\fBvirtual\fP bool std::error_category::equivalent (const \fBerror_code\fP & __code, int __i) const\fC [virtual]\fP, \fC [noexcept]\fP" .PP Test whether \fCcode\fP corresponds to \fCi\fP for this category\&. .SS "\fBvirtual\fP bool std::error_category::equivalent (int __i, const \fBerror_condition\fP & __cond) const\fC [virtual]\fP, \fC [noexcept]\fP" .PP Test whether \fCcond\fP corresponds to \fCi\fP for this category\&. .SS "\fBvirtual\fP const char * std::error_category::name () const\fC [pure virtual]\fP, \fC [noexcept]\fP" .PP A string that identifies the error category\&. .SS "bool std::error_category::operator< (const \fBerror_category\fP & __other) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Ordered comparison that defines a total order for error categories\&. .SS "bool std::error_category::operator== (const \fBerror_category\fP & __other) const\fC [inline]\fP, \fC [noexcept]\fP" .PP An error_category only compares equal to itself\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.