Debian Codegraph @

libstdc++-v3/testsuite/27_io/basic_ifstream/native_handle/char/1.cc

raw
1 // { dg-options "-fno-inline" }
2 // { dg-do run { target c++26 } }
3 // { dg-additional-files "filebuf_members-1.txt" }
4
5 #include <fstream>
6 #include <testsuite_hooks.h>
7
8 void
9 test01()
10 {
11 static_assert( std::is_same_v<std::filebuf::native_handle_type,
12 std::ifstream::native_handle_type> );
13 std::ifstream f;
14 f.open("filebuf_members-1.txt");
15 VERIFY( f.native_handle() == f.rdbuf()->native_handle() );
16 }
17
18 int main()
19 {
20 test01();
21 }