Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2008-02-22 19:11:07


Author: turkanis
Date: 2008-02-22 19:11:07 EST (Fri, 22 Feb 2008)
New Revision: 43393
URL: http://svn.boost.org/trac/boost/changeset/43393

Log:
merged changes from iostreams_dev
Text files modified:
   trunk/boost/iostreams/close.hpp | 10 ++++------
   1 files changed, 4 insertions(+), 6 deletions(-)

Modified: trunk/boost/iostreams/close.hpp
==============================================================================
--- trunk/boost/iostreams/close.hpp (original)
+++ trunk/boost/iostreams/close.hpp 2008-02-22 19:11:07 EST (Fri, 22 Feb 2008)
@@ -202,14 +202,12 @@
 template<>
 struct close_impl<close_filtering_stream> {
     template<typename T>
- static void close(T& t)
- {
- t.pop();
- }
- template<typename T>
     static void close(T& t, BOOST_IOS::openmode which)
     {
- if (which == BOOST_IOS::out)
+ typedef typename category_of<T>::type category;
+ const bool in = is_convertible<category, input>::value &&
+ !is_convertible<category, output>::value;
+ if (in == (which == BOOST_IOS::in))
             t.pop();
     }
 };


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