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

来自cppreference.com
< cpp‎ | io‎ | basic ifstream
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) 原生句柄支持

示例