18 Diagnostics library [diagnostics]

18.5 System error support [syserr]

18.5.3 Class error_­code [syserr.errcode] Modifiers [syserr.errcode.modifiers]

void assign(int val, const error_category& cat) noexcept;
Ensures: val_­ == val and cat_­ == &cat.
template<class ErrorCodeEnum> error_code& operator=(ErrorCodeEnum e) noexcept;
Ensures: *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;
Ensures: value() == 0 and category() == system_­category().