Documentation Home >> Headers >> <system_error> Header

The <system_error> header provides support for reporting errors from low-level facilities such as operating system functions.

namespace std
{
    enum class errc;
    class error_category;
    class error_code;
    class error_condition;
    class system_error;

    template <class T>
    struct is_error_code_enum:
        public false_type
    {};

    template <class T>
    struct is_error_condition_enum:
        public false_type
    {};

    template <>
    struct is_error_condition_enum<errc>:
        public true_type
    {};

    error_code make_error_code(errc e);
    error_condition make_error_condition(errc e);

    bool operator==(
        const error_code& lhs, const error_code& rhs);
    bool operator==(
        const error_code& lhs,
        const error_condition& rhs);
    bool operator==(
        const error_condition& lhs,
        const error_code& rhs);
    bool operator==(
        const error_condition& lhs,
        const error_condition& rhs);
    bool operator!=(
        const error_code& lhs, const error_code& rhs);
    bool operator!=(
        const error_code& lhs,
        const error_condition& rhs);
    bool operator!=(
        const error_condition& lhs,
        const error_code& rhs);
    bool operator!=(
        const error_condition& lhs,
        const error_condition& rhs);

    const error_category& get_generic_category();
    const error_category& get_system_category();

    static const error_category& generic_category =
        get_generic_category();
    static const error_category& system_category =
        get_system_category();
}
See Also