function
<future>

std::make_error_code (future_errc)

error_code make_error_code (future_errc e) noexcept;
Make error code
Creates an error_code object of the future_category from the future_errc enum value e.

It returns the same as
1
error_code(static_cast<int>(e),future_category());

This function is called by error_code's constructor overload for the future_errc type.

Parameters

e
An enum value of type future_errc.

Return value

An error_code object representing the enum value e.

Exception safety

No-throw guarantee: this function never throws exceptions.

See also