Класс error_condition описывает объект, используемый для хранения значений, идентифицирующих условия ошибки. [ Note: error_condition значения - это переносимые абстракции, а error_code значения зависят от реализации. ] — end note
namespace std { class error_condition { public: // [syserr.errcondition.constructors], constructors error_condition() noexcept; error_condition(int val, const error_category& cat) noexcept; template <class ErrorConditionEnum> error_condition(ErrorConditionEnum e) noexcept; // [syserr.errcondition.modifiers], modifiers void assign(int val, const error_category& cat) noexcept; template <class ErrorConditionEnum> error_condition& operator=(ErrorConditionEnum e) noexcept; void clear() noexcept; // [syserr.errcondition.observers], observers int value() const noexcept; const error_category& category() const noexcept; string message() const; explicit operator bool() const noexcept; private: int val_; // exposition only const error_category* cat_; // exposition only }; }
error_condition() noexcept;
error_condition(int val, const error_category& cat) noexcept;
template <class ErrorConditionEnum>
error_condition(ErrorConditionEnum e) noexcept;
void assign(int val, const error_category& cat) noexcept;
template <class ErrorConditionEnum>
error_condition& operator=(ErrorConditionEnum e) noexcept;
Remarks: Этот оператор не должен участвовать в разрешении перегрузки , если
is_error_condition_enum_v<ErrorConditionEnum> не true.
void clear() noexcept;
int value() const noexcept;
const error_category& category() const noexcept;
string message() const;
explicit operator bool() const noexcept;
error_condition make_error_condition(errc e) noexcept;