Files
2025-10-25 03:02:53 +03:00

1.5 KiB

[syserr.errcode.constructors]

19 Diagnostics library [diagnostics]

19.5 System error support [syserr]

19.5.4 Class error_code [syserr.errcode]

19.5.4.2 Constructors [syserr.errcode.constructors]

🔗

error_code() noexcept;

1

#

Effects: Initializes val_ with 0 and cat_ with &system_category().

🔗

error_code(int val, const error_category& cat) noexcept;

2

#

Effects: Initializes val_ with val and cat_ with &cat.

🔗

template<class ErrorCodeEnum> error_code(ErrorCodeEnum e) noexcept;

3

#

Constraints: is_error_code_enum_v is true.

4

#

Effects: Equivalent to:error_code ec = make_error_code(e); assign(ec.value(), ec.category());