Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61641 - in branches/release: boost/iostreams boost/iostreams/detail boost/iostreams/filter libs/iostreams libs/iostreams/test
From: daniel_james_at_[hidden]
Date: 2010-04-28 04:29:12


Author: danieljames
Date: 2010-04-28 04:29:11 EDT (Wed, 28 Apr 2010)
New Revision: 61641
URL: http://svn.boost.org/trac/boost/changeset/61641

Log:
Merge iostreams. Fixes #4135 and some small tweaks for clang.

Properties modified:
   branches/release/boost/iostreams/ (props changed)
   branches/release/libs/iostreams/ (props changed)
Text files modified:
   branches/release/boost/iostreams/detail/path.hpp | 2 +-
   branches/release/boost/iostreams/filter/newline.hpp | 22 +++++++++++-----------
   branches/release/libs/iostreams/test/mapped_file_test.cpp | 17 +++++++++++++++++
   3 files changed, 29 insertions(+), 12 deletions(-)

Modified: branches/release/boost/iostreams/detail/path.hpp
==============================================================================
--- branches/release/boost/iostreams/detail/path.hpp (original)
+++ branches/release/boost/iostreams/detail/path.hpp 2010-04-28 04:29:11 EDT (Wed, 28 Apr 2010)
@@ -48,7 +48,7 @@
 
     // Constructor taking a boost::filesystem::path or boost::filesystem::wpath
     template<typename Path>
- explicit path(const Path& p)
+ explicit path(const Path& p, typename Path::external_string_type* = 0)
     {
         typedef typename Path::external_string_type string_type;
         init(p, boost::type<string_type>());

Modified: branches/release/boost/iostreams/filter/newline.hpp
==============================================================================
--- branches/release/boost/iostreams/filter/newline.hpp (original)
+++ branches/release/boost/iostreams/filter/newline.hpp 2010-04-28 04:29:11 EDT (Wed, 28 Apr 2010)
@@ -121,9 +121,9 @@
 
     explicit newline_filter(int target) : flags_(target)
     {
- if ( target != newline::posix &&
- target != newline::dos &&
- target != newline::mac )
+ if ( target != iostreams::newline::posix &&
+ target != iostreams::newline::dos &&
+ target != iostreams::newline::mac )
         {
             boost::throw_exception(std::logic_error("bad flags"));
         }
@@ -227,12 +227,12 @@
         using iostreams::newline::CR;
         using iostreams::newline::LF;
 
- switch (flags_ & newline::platform_mask) {
- case newline::posix:
+ switch (flags_ & iostreams::newline::platform_mask) {
+ case iostreams::newline::posix:
             return LF;
- case newline::mac:
+ case iostreams::newline::mac:
             return CR;
- case newline::dos:
+ case iostreams::newline::dos:
             if (flags_ & f_has_LF) {
                 flags_ &= ~f_has_LF;
                 return LF;
@@ -252,14 +252,14 @@
         using iostreams::newline::LF;
 
         bool success = false;
- switch (flags_ & newline::platform_mask) {
- case newline::posix:
+ switch (flags_ & iostreams::newline::platform_mask) {
+ case iostreams::newline::posix:
             success = boost::iostreams::put(dest, LF);
             break;
- case newline::mac:
+ case iostreams::newline::mac:
             success = boost::iostreams::put(dest, CR);
             break;
- case newline::dos:
+ case iostreams::newline::dos:
             if ((flags_ & f_has_LF) != 0) {
                 if ((success = boost::iostreams::put(dest, LF)))
                     flags_ &= ~f_has_LF;

Modified: branches/release/libs/iostreams/test/mapped_file_test.cpp
==============================================================================
--- branches/release/libs/iostreams/test/mapped_file_test.cpp (original)
+++ branches/release/libs/iostreams/test/mapped_file_test.cpp 2010-04-28 04:29:11 EDT (Wed, 28 Apr 2010)
@@ -283,6 +283,23 @@
             "done reopening private mapped_file"
         );
     }
+
+ //-------------Check creating opening mapped_file with char*-------------//
+
+ {
+ boost::iostreams::test::test_file orig;
+ char name[50];
+ std::strcpy(name, orig.name().c_str());
+
+ mapped_file mf((char*) name);
+
+ BOOST_CHECK_MESSAGE(
+ boost::iostreams::test::test_writeable(mf),
+ "failed seeking within private mapped_file"
+ );
+
+ mf.close();
+ }
 }
 
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)


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