22 Diagnostics library [diagnostics]

22.5 System error support [syserr]

22.5.3 Class error_Β­code [syserr.errcode]

22.5.3.3 Class error_Β­code modifiers [syserr.errcode.modifiers]

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

Postconditions: val_Β­ == val and cat_Β­ == &cat.

template <class ErrorCodeEnum> error_code& operator=(ErrorCodeEnum e) noexcept;

Postconditions: *this == make_Β­error_Β­code(e).

Returns: *this.

Remarks: This operator shall not participate in overload resolution unless
is_Β­error_Β­code_Β­enum_Β­v<ErrorCodeEnum> is true.

void clear() noexcept;

Postconditions: value() == 0 and category() == system_Β­category().