logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

std::error_category

Author

       Generated automatically by Doxygen for libstdc++ from the source code.

                                                    libstdc++                          std::error_category(3cxx)

Detailed Description

       Abstract base class for types defining a category of error codes.

       An error category defines a context that gives meaning to the integer stored in an error_code or
       error_condition object. For example, the standard errno constants such a EINVAL and ENOMEM 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.

       A user-defined category can override the equivalent 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.

       Since
           C++11

Member Function Documentation

virtualerror_conditionstd::error_category::default_error_condition(int__i)const[virtual],[noexcept]
       Return an error_condition corresponding to i in this category.

   virtualboolstd::error_category::equivalent(consterror_code&__code,int__i)const[virtual],[noexcept]
       Test whether code corresponds to i for this category.

   virtualboolstd::error_category::equivalent(int__i,consterror_condition&__cond)const[virtual],[noexcept]
       Test whether cond corresponds to i for this category.

   virtualconstchar*std::error_category::name()const[purevirtual],[noexcept]
       A string that identifies the error category.

   boolstd::error_category::operator<(consterror_category&__other)const[inline],[noexcept]
       Ordered comparison that defines a total order for error categories.

   boolstd::error_category::operator==(consterror_category&__other)const[inline],[noexcept]
       An error_category only compares equal to itself.

Name

       std::error_category

Synopsis

       #include <system_error>

   PublicMemberFunctionserror_category (const error_category &)=deletevirtualerror_conditiondefault_error_condition (int __i) const noexcept
           Return an error_condition corresponding to i in this category.
       virtual bool equivalent (const error_code &__code, int __i) const noexcept
           Test whether code corresponds to i for this category.
       virtual bool equivalent (int __i, const error_condition &__cond) const noexcept
           Test whether cond corresponds to i for this category.
       virtualstringmessage (int) const =0
       virtual const char * name () const noexcept=0
           A string that identifies the error category.
       bool operator!= (const error_category &__other) const noexcept
       bool operator< (const error_category &__other) const noexcept
           Ordered comparison that defines a total order for error categories.
       error_category & operator= (const error_category &)=delete
       bool operator== (const error_category &__other) const noexcept
           An error_category only compares equal to itself.

See Also