Namespaces
Variants

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

From cppreference.com
 
 
Input/output library
I/O manipulators
Print functions (C++23)
C-style I/O
Buffers
(deprecated in C++98)(removed in C++26)
Streams
Abstractions
File I/O
String I/O
Array I/O
(deprecated in C++98)(removed in C++26)
(deprecated in C++98)(removed in C++26)
(deprecated in C++98)(removed in C++26)
Synchronized Output
Types
Error category interface
(C++11)
 
 
native_handle_type native_handle() const noexcept;
(since C++26)

Returns the implementation defined underlying handle associated with basic_filebuf. The behavior is undefined if is_open() is false.

Return value

rdbuf()->native_handle()

Notes

Feature-test macro Value Std Feature
__cpp_lib_fstream_native_handle 202306L (C++26) native handles support

Example