函式
<ios> <iostream>

std::make_error_condition (io_errc)

error_code make_error_condition (io_errc e);
error_code make_error_condition (io_errc e) noexcept;
建立錯誤條件
io_errc 列舉值 e(屬於 iostream_category)建立一個 error_condition 物件。

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

當傳遞 io_errc 型別引數給 error_condition 的建構函式時,會呼叫此過載。

引數

e
io_errc 型別的列舉值。

返回值

代表列舉值 eerror_condition 物件。

異常安全

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

另見