19 Diagnostics library [diagnostics]

19.5 System error support [syserr]

19.5.4 Class error_­code [syserr.errcode]

19.5.4.3 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;
Constraints: is_­error_­code_­enum_­v<ErrorCodeEnum> is true.
Postconditions: *this == make_­error_­code(e).
Returns: *this.
void clear() noexcept;
Postconditions: value() == 0 and category() == system_­category().