Documentation Home >> Headers >> <system_error> Header >> std::error_category class

Instances of std::error_category represent a category of error. Error codes and error categories combine to identify the cause of an error.

class error_category
    error_category(const error_category&) = delete;
    error_category& operator=(
        const error_category&) = delete;

    virtual ~error_category();

    virtual const char* name() const = 0;
    virtual error_condition default_error_condition(
        int ev) const;
    virtual bool equivalent(
        int code,
        const error_condition& condition) const;
    virtual bool equivalent(
        const error_code& code, int condition) const;
    virtual std::string message(int ev) const = 0;

    bool operator==(const error_category& rhs) const;
    bool operator!=(const error_category& rhs) const;
    bool operator<(const error_category& rhs) const;

#include <system_error>

See Also