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

Instances of std::error_condition hold error condition values such as those reported by operating system functions.

class error_condition
{
public:
    error_condition();
    error_condition(
        int val, const error_category& cat);
    template <class ErrorConditionEnum>
    error_condition(ErrorConditionEnum e);

    void assign(int val, const error_category& cat);

    template <class ErrorConditionEnum>
    error_condition& operator=(ErrorConditionEnum e);

    void clear();

    int value() const;
    const error_category& category() const;
    std::string message() const;
    explicit operator bool() const;
};
Header

#include <system_error>

See Also