19 Diagnostics library [diagnostics]

19.5 System error support [syserr]

19.5.2 Class error_code [syserr.errcode]

19.5.2.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<ErrorCodeEnum>::value is true.