名稱空間
變體
操作

std::basic_fstream<CharT,Traits>::native_handle

來自 cppreference.com
< cpp‎ | io‎ | basic_fstream
native_handle_type native_handle() const noexcept;
(C++26 起)

返回與 basic_filebuf 關聯的、由實現定義的底層控制代碼。如果 is_open()false,則行為未定義。

[編輯] 返回值

rdbuf()->native_handle()

[編輯] 注意

特性測試 標準 特性
__cpp_lib_fstream_native_handle 202306L (C++26) 原生控制代碼支援

[編輯] 示例