22 Diagnostics library [diagnostics]

22.5 System error support [syserr]

22.5.3 Class error_­code [syserr.errcode]

22.5.3.2 Class error_­code constructors [syserr.errcode.constructors]

error_code() noexcept;
Effects: Constructs an object of type error_­code.
Postconditions: val_­ == 0 and cat_­ == &system_­category().
error_code(int val, const error_category& cat) noexcept;
Effects: Constructs an object of type error_­code.
Postconditions: val_­ == val and cat_­ == &cat.
template<class ErrorCodeEnum> error_code(ErrorCodeEnum e) noexcept;
Effects: Constructs an object of type error_­code.
Postconditions: *this == make_­error_­code(e).
Remarks: This constructor shall not participate in overload resolution unless
is_­error_­code_­enum_­v<ErrorCodeEnum> is true.