Skip to content

Commit 89bfc6d

Browse files
committed
Use boost::filesystem::path::string() with std::ofstream for portability
1 parent 8c4e3bf commit 89bfc6d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/Jamfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ local requirements =
4949
<toolset>msvc:<define>_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING
5050
<toolset>msvc:<define>_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING
5151
<toolset>msvc,<variant>release:<cxxflags>"/Ob2 /Oi /Ot"
52-
<toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj
5352
<target-os>linux:<define>_XOPEN_SOURCE=600
5453
<target-os>linux:<define>_GNU_SOURCE=1
5554
<target-os>solaris:<define>_XOPEN_SOURCE=500
@@ -59,6 +58,7 @@ local requirements =
5958
<target-os>windows:<define>_WIN32_WINNT=0x0A00
6059
<target-os>windows,<toolset>gcc:<library>ws2_32
6160
<target-os>windows,<toolset>gcc:<library>mswsock
61+
<target-os>windows,<toolset>gcc:<cxxflags>"-Wa,-mbig-obj"
6262
<target-os>windows,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
6363
<target-os>hpux,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
6464
<target-os>hpux:<library>ipv6

test/beast/core/file_test.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ test_file()
113113
{
114114
// no exceptions - failure will result in an empty string
115115
std::ifstream in;
116-
in.open(path.native());
116+
in.open(path.string());
117117
noskipws(in);
118118
auto s = std::string(
119119
std::istream_iterator<char>(in),

test/beast/http/file_body.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class file_body_test : public beast::unit_test::suite
168168
"0123456789"; // 40
169169
// create the temporary file
170170
{
171-
std::ofstream fstemp(temp.path().native());
171+
std::ofstream fstemp(temp.path().string());
172172
std::size_t written = 0;
173173
std::size_t to_write = 4097;
174174
while (written < to_write)
@@ -223,7 +223,7 @@ class file_body_test : public beast::unit_test::suite
223223
"0123456789"; // 40
224224
// create the temporary file
225225
{
226-
std::ofstream fstemp(temp.path().native());
226+
std::ofstream fstemp(temp.path().string());
227227
std::size_t written = 0;
228228
std::size_t to_write = 2048;
229229
while (written < to_write)

0 commit comments

Comments
 (0)