函式
<future>

std::make_error_code (future_errc)

error_code make_error_code (future_errc e) noexcept;
建立錯誤碼
future_errc 列舉值 e 建立一個 error_code 物件,其底層類別為 future_category

它返回的結果與
1
error_code(static_cast<int>(e),future_category());

error_code 的建構函式接收 future_errc 型別時,會呼叫此函式。

引數

e
future_errc 型別的列舉值。

返回值

表示列舉值 eerror_code 物件。

異常安全

無異常保證:此函式從不丟擲異常。

另見