Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcxx/src/filesystem/operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_cod
ec.clear();
return true;
}
#elif defined(_LIBCPP_FILESYSTEM_USE_FSTREAM)
#elif defined(_LIBCPP_FILESYSTEM_USE_FSTREAM) && defined(_LIBCPP_FILESYSTEM_NEED_FSTREAM)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#elif defined(_LIBCPP_FILESYSTEM_USE_FSTREAM) && defined(_LIBCPP_FILESYSTEM_NEED_FSTREAM)
#elif defined(_LIBCPP_FILESYSTEM_USE_FSTREAM)

bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
return copy_file_impl_fstream(read_fd, write_fd, ec);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return copy_file_impl_fstream(read_fd, write_fd, ec);
# if !defined(_LIBCPP_FILESYSTEM_HAS_FSTREAM_FALLBACK)
# error copy_file intends to use std::fstream as a fallback, but std::fstream is not available in this configuration
# endif
return copy_file_impl_fstream(read_fd, write_fd, ec);

}
Expand Down
Loading