Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84163 - trunk/libs/iostreams/test
From: dnljms_at_[hidden]
Date: 2013-05-06 06:29:01


Author: danieljames
Date: 2013-05-06 06:29:00 EDT (Mon, 06 May 2013)
New Revision: 84163
URL: http://svn.boost.org/trac/boost/changeset/84163

Log:
Fix `tee_test` on C++03 compilers.

The constructor from std::string is apparently a C++11 feature.
Text files modified:
   trunk/libs/iostreams/test/tee_test.cpp | 10 +++++-----
   1 files changed, 5 insertions(+), 5 deletions(-)

Modified: trunk/libs/iostreams/test/tee_test.cpp
==============================================================================
--- trunk/libs/iostreams/test/tee_test.cpp (original)
+++ trunk/libs/iostreams/test/tee_test.cpp 2013-05-06 06:29:00 EDT (Mon, 06 May 2013)
@@ -246,7 +246,7 @@
         temp_file dest1;
         temp_file dest2;
         filtering_ostream out;
- std::ofstream stream1(dest1.name(), out_mode);
+ std::ofstream stream1(dest1.name().c_str(), out_mode);
         out.push(tee(stream1));
         out.push(file_sink(dest2.name(), out_mode));
         write_data_in_chunks(out);
@@ -259,7 +259,7 @@
         temp_file dest1;
         temp_file dest2;
         filtering_ostream out;
- std::ofstream stream1(dest1.name(), out_mode);
+ std::ofstream stream1(dest1.name().c_str(), out_mode);
         out.push( tee ( stream1,
                         file_sink(dest2.name(), out_mode) ) );
         write_data_in_chunks(out);
@@ -272,7 +272,7 @@
         temp_file dest1;
         temp_file dest2;
         filtering_ostream out;
- std::ofstream stream2(dest2.name(), out_mode);
+ std::ofstream stream2(dest2.name().c_str(), out_mode);
         out.push( tee ( file_sink(dest1.name(), out_mode),
                         stream2 ) );
         write_data_in_chunks(out);
@@ -285,8 +285,8 @@
         temp_file dest1;
         temp_file dest2;
         filtering_ostream out;
- std::ofstream stream1(dest1.name(), out_mode);
- std::ofstream stream2(dest2.name(), out_mode);
+ std::ofstream stream1(dest1.name().c_str(), out_mode);
+ std::ofstream stream2(dest2.name().c_str(), out_mode);
         out.push(tee(stream1, stream2));
         write_data_in_chunks(out);
         BOOST_CHECK_MESSAGE(


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk