19 Diagnostics library [diagnostics]

19.5 System error support [syserr]

19.5.2 Class error_code [syserr.errcode] 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<ErrorCodeEnum>::value is true.

void clear() noexcept;

Postconditions: value() == 0 and category() == system_category().