[libcxx-commits] [libcxx] [libc++] Fix insufficiently guarded call to `copy_file_impl_fstream` (PR #214706)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 7 05:46:45 PDT 2026


================
@@ -362,7 +362,13 @@ bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_cod
 }
 #elif defined(_LIBCPP_FILESYSTEM_USE_FSTREAM)
 bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
+#  if defined(_LIBCPP_FILESYSTEM_NEED_FSTREAM)
   return copy_file_impl_fstream(read_fd, write_fd, ec);
+#  else
+  // iostreams are unavailable in the no-locale build, just fail.
----------------
ldionne wrote:

Switching from a compilation-time failure to a guaranteed runtime failure seems like a net loss, no?

https://github.com/llvm/llvm-project/pull/214706


More information about the libcxx-commits mailing list