@@ -26,7 +26,6 @@ bool is_open(const file& file) {
2626 return file.rdbuf ()->is_open ();
2727}
2828
29- #if __cpp_lib_fstream_native_handle >= 202306L
3029// / Checks if the given file handle is valid
3130// / @param handle handle to check
3231// / @returns whether the handle is valid
@@ -38,7 +37,6 @@ bool is_open(file::native_handle_type handle) {
3837 return fcntl (handle, F_GETFD) != -1 ;
3938#endif
4039}
41- #endif
4240
4341// / Tests file type traits and member types
4442TEST (file, type_traits) {
@@ -61,10 +59,7 @@ TEST(file, create) {
6159 EXPECT_TRUE (fs::is_regular_file (tmpfile));
6260 EXPECT_TRUE (fs::equivalent (parent, fs::temp_directory_path ()));
6361 EXPECT_TRUE (is_open (tmpfile));
64-
65- #if __cpp_lib_fstream_native_handle >= 202306L
6662 EXPECT_TRUE (is_open (tmpfile.native_handle ()));
67- #endif
6863
6964 fs::perms permissions = fs::status (tmpfile).permissions ();
7065#ifdef _WIN32
@@ -199,22 +194,16 @@ TEST(file, move_to_non_existing_directory) {
199194// / Tests that destructor removes a file
200195TEST (file, destructor) {
201196 fs::path path;
202- #if __cpp_lib_fstream_native_handle >= 202306L
203197 file::native_handle_type handle;
204- #endif
205198
206199 {
207200 file tmpfile = file ();
208201 path = tmpfile;
209- #if __cpp_lib_fstream_native_handle >= 202306L
210202 handle = tmpfile.native_handle ();
211- #endif
212203 }
213204
214205 EXPECT_FALSE (fs::exists (path));
215- #if __cpp_lib_fstream_native_handle >= 202306L
216206 EXPECT_FALSE (is_open (handle));
217- #endif
218207}
219208
220209// / Tests file move constructor
0 commit comments