[libcxx-commits] [PATCH] D89539: [libcxx] [test] Use string() instead of native() as parameter to std::ifstream/ofstream in copy_file_large.pass.cpp
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 16 03:46:57 PDT 2020
mstorsjo created this revision.
mstorsjo added a reviewer: libc++.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.
mstorsjo requested review of this revision.
This fixes building with libstdc++. MS STL has got ifstream/ofstream overloads that taken wide strings though.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89539
Files:
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
Index: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
@@ -54,7 +54,7 @@
const std::string additional_data(additional_size, 'x');
// Append known data to the end of the source file.
{
- std::ofstream outf(file.native(), std::ios_base::app);
+ std::ofstream outf(file.string(), std::ios_base::app);
TEST_REQUIRE(outf.good());
outf << additional_data;
TEST_REQUIRE(outf);
@@ -74,7 +74,7 @@
std::string out_data;
out_data.reserve(additional_size);
{
- std::ifstream dest_file(dest.native());
+ std::ifstream dest_file(dest.string());
TEST_REQUIRE(dest_file);
dest_file.seekg(sendfile_size_limit);
TEST_REQUIRE(dest_file);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89539.298589.patch
Type: text/x-patch
Size: 989 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201016/00c0bb3e/attachment-0001.bin>
More information about the libcxx-commits
mailing list