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) 原生句柄支持

[編輯] 示例