.TH "std::error_category" 3 "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::error_category .SH SYNOPSIS .br .PP .PP \fR#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBerror_category\fP (const error_category &)=delete" .br .ti -1c .RI "virtual \fBerror_condition\fP \fBdefault_error_condition\fP (int __i) const noexcept" .br .RI "Return an error_condition corresponding to \fRi\fP in this category\&. " .ti -1c .RI "virtual bool \fBequivalent\fP (const \fBerror_code\fP &__code, int __i) const noexcept" .br .RI "Test whether \fRcode\fP corresponds to \fRi\fP for this category\&. " .ti -1c .RI "virtual bool \fBequivalent\fP (int __i, const \fBerror_condition\fP &__cond) const noexcept" .br .RI "Test whether \fRcond\fP corresponds to \fRi\fP for this category\&. " .ti -1c .RI "virtual \fBstring\fP \fBmessage\fP (int) const =0" .br .RI "A description of the error condition corresponding to the number\&. " .ti -1c .RI "virtual const char * \fBname\fP () const noexcept=0" .br .RI "A string that identifies the error category\&. " .ti -1c .RI "strong_ordering \fBoperator<=>\fP (const error_category &__rhs) const noexcept" .br .RI "Ordered comparison that defines a total order for error categories\&. " .ti -1c .RI "error_category & \fBoperator=\fP (const error_category &)=delete" .br .ti -1c .RI "bool \fBoperator==\fP (const error_category &__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 \fRerror_code\fP or \fRerror_condition\fP object\&. For example, the standard \fRerrno\fP constants such a \fREINVAL\fP and \fRENOMEM\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 \fRequivalent\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 "virtual \fBerror_condition\fP std::error_category::default_error_condition (int __i) const\fR [virtual]\fP, \fR [noexcept]\fP" .PP Return an error_condition corresponding to \fRi\fP in this category\&. .SS "virtual bool std::error_category::equivalent (const \fBerror_code\fP & __code, int __i) const\fR [virtual]\fP, \fR [noexcept]\fP" .PP Test whether \fRcode\fP corresponds to \fRi\fP for this category\&. .SS "virtual bool std::error_category::equivalent (int __i, const \fBerror_condition\fP & __cond) const\fR [virtual]\fP, \fR [noexcept]\fP" .PP Test whether \fRcond\fP corresponds to \fRi\fP for this category\&. .SS "virtual \fBstring\fP std::error_category::message (int ) const\fR [pure virtual]\fP" .PP A description of the error condition corresponding to the number\&. .PP References \fBmessage()\fP\&. .PP Referenced by \fBmessage()\fP, \fBstd::error_code::message()\fP, and \fBstd::error_condition::message()\fP\&. .SS "virtual const char * std::error_category::name () const\fR [pure virtual]\fP, \fR [noexcept]\fP" .PP A string that identifies the error category\&. .SS "strong_ordering std::error_category::operator<=> (const error_category & __rhs) const\fR [inline]\fP, \fR [nodiscard]\fP, \fR [noexcept]\fP" .PP Ordered comparison that defines a total order for error categories\&. .PP References \fBoperator<=>()\fP\&. .PP Referenced by \fBoperator<=>()\fP\&. .SS "bool std::error_category::operator== (const error_category & __other) const\fR [inline]\fP, \fR [noexcept]\fP" .PP An error_category only compares equal to itself\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.