Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2008-01-14 03:40:44


Author: turkanis
Date: 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
New Revision: 42743
URL: http://svn.boost.org/trac/boost/changeset/42743

Log:
changed the semantics of close() for dual_use filters: close() is now called just once, with the value of the which parameter determined by the mode of the associated chain
Text files modified:
   branches/iostreams_dev/boost/iostreams/combine.hpp | 23 ++++++++-
   branches/iostreams_dev/boost/iostreams/compose.hpp | 95 +++++++++++++++++++++++++++++++++------
   branches/iostreams_dev/boost/iostreams/detail/config/disable_warnings.hpp | 1
   branches/iostreams_dev/boost/iostreams/detail/config/enable_warnings.hpp | 2
   branches/iostreams_dev/boost/iostreams/detail/streambuf/indirect_streambuf.hpp | 6 ++
   branches/iostreams_dev/boost/iostreams/filter/gzip.hpp | 2
   branches/iostreams_dev/boost/iostreams/filter/newline.hpp | 32 +++++-------
   branches/iostreams_dev/boost/iostreams/filter/symmetric.hpp | 7 +-
   branches/iostreams_dev/libs/iostreams/test/close_test.cpp | 8 ++-
   branches/iostreams_dev/libs/iostreams/test/combine_test.cpp | 9 ++-
   branches/iostreams_dev/libs/iostreams/test/compose_test.cpp | 38 +++++++++------
   branches/iostreams_dev/libs/iostreams/test/copy_test.cpp | 28 ++++++++--
   branches/iostreams_dev/libs/iostreams/test/detail/utf8_codecvt_facet.cpp | 3
   branches/iostreams_dev/libs/iostreams/test/restrict_test.cpp | 11 ++--
   14 files changed, 187 insertions(+), 78 deletions(-)

Modified: branches/iostreams_dev/boost/iostreams/combine.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/combine.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/combine.hpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -26,6 +26,9 @@
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/type_traits/is_same.hpp>
 
+// Must come last.
+#include <boost/iostreams/detail/config/disable_warnings.hpp>
+
 namespace boost { namespace iostreams {
 
 namespace detail {
@@ -97,10 +100,20 @@
     template<typename Sink>
     void close(Sink& snk, BOOST_IOS::openmode which)
         {
- if (which == BOOST_IOS::in)
- detail::close_all(in_, snk);
- if (which == BOOST_IOS::out)
- detail::close_all(out_, snk);
+ if (which == BOOST_IOS::in) {
+ if (is_convertible<in_category, dual_use>::value) {
+ iostreams::close(in_, snk, BOOST_IOS::in);
+ } else {
+ detail::close_all(in_, snk);
+ }
+ }
+ if (which == BOOST_IOS::out) {
+ if (is_convertible<in_category, dual_use>::value) {
+ iostreams::close(out_, snk, BOOST_IOS::out);
+ } else {
+ detail::close_all(out_, snk);
+ }
+ }
         }
     #ifndef BOOST_NO_STD_LOCALE
         void imbue(const std::locale& loc);
@@ -230,4 +243,6 @@
 
 } } // End namespaces iostreams, boost.
 
+#include <boost/iostreams/detail/config/enable_warnings.hpp>
+
 #endif // #ifndef BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED

Modified: branches/iostreams_dev/boost/iostreams/compose.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/compose.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/compose.hpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -65,6 +65,8 @@
 class composite_device {
 private:
     typedef typename detail::param_type<Device>::type param_type;
+ typedef typename mode_of<Filter>::type filter_mode;
+ typedef typename mode_of<Device>::type device_mode;
     typedef typename
             iostreams::select< // Disambiguation for Tru64.
                 is_direct<Device>, direct_adapter<Device>,
@@ -120,7 +122,23 @@
               BOOST_DEDUCED_TYPENAME composite_mode<Filter1, Filter2>::type >
 class composite_filter {
 private:
- typedef reference_wrapper<Filter2> filter_ref;
+ typedef reference_wrapper<Filter2> filter_ref;
+ typedef typename mode_of<Filter1>::type first_mode;
+ typedef typename mode_of<Filter2>::type second_mode;
+
+ // A dual-use filter cannot be composed with a read-write filter
+ BOOST_STATIC_ASSERT(
+ !(is_convertible<first_mode, dual_use>::value) ||
+ !(is_convertible<second_mode, input>::value) ||
+ !(is_convertible<second_mode, output>::value) ||
+ (is_convertible<second_mode, dual_use>::value)
+ );
+ BOOST_STATIC_ASSERT(
+ !(is_convertible<second_mode, dual_use>::value) ||
+ !(is_convertible<first_mode, input>::value) ||
+ !(is_convertible<first_mode, output>::value) ||
+ (is_convertible<first_mode, dual_use>::value)
+ );
 public:
     typedef typename char_type_of<Filter1>::type char_type;
     struct category
@@ -170,12 +188,24 @@
 
         // Close input sequences in reverse order and output sequences in
         // forward order
- detail::execute_all(
- detail::call_close(filter2_, dev, BOOST_IOS::in),
- detail::call_close(filter1_, cmp, BOOST_IOS::in),
- detail::call_close(filter1_, cmp, BOOST_IOS::out),
- detail::call_close(filter2_, dev, BOOST_IOS::out)
- );
+ if (!is_convertible<first_mode, dual_use>::value) {
+ detail::execute_all(
+ detail::call_close(filter2_, dev, BOOST_IOS::in),
+ detail::call_close(filter1_, cmp, BOOST_IOS::in),
+ detail::call_close(filter1_, cmp, BOOST_IOS::out),
+ detail::call_close(filter2_, dev, BOOST_IOS::out)
+ );
+ } else if (is_convertible<second_mode, input>::value) {
+ detail::execute_all(
+ detail::call_close(filter2_, dev, BOOST_IOS::in),
+ detail::call_close(filter1_, cmp, BOOST_IOS::in)
+ );
+ } else {
+ detail::execute_all(
+ detail::call_close(filter1_, cmp, BOOST_IOS::out),
+ detail::call_close(filter2_, dev, BOOST_IOS::out)
+ );
+ }
     }
 
     template<typename Device>
@@ -190,18 +220,26 @@
         composite_device<filter_ref, Device> cmp(boost::ref(filter2_), dev);
 
         // Close input sequences in reverse order
- if (which == BOOST_IOS::in)
+ if ( which == BOOST_IOS::in &&
+ ( !is_convertible<first_mode, dual_use>::value ||
+ is_convertible<second_mode, input>::value ) )
+ {
             detail::execute_all(
                 detail::call_close(filter2_, dev, BOOST_IOS::in),
                 detail::call_close(filter1_, cmp, BOOST_IOS::in)
             );
+ }
 
         // Close output sequences in forward order
- if (which == BOOST_IOS::out)
+ if ( which == BOOST_IOS::out &&
+ ( !is_convertible<first_mode, dual_use>::value ||
+ is_convertible<second_mode, output>::value ) )
+ {
             detail::execute_all(
                 detail::call_close(filter1_, cmp, BOOST_IOS::out),
                 detail::call_close(filter2_, dev, BOOST_IOS::out)
             );
+ }
     }
 
     template<typename Device>
@@ -381,30 +419,57 @@
 
     // Close input sequences in reverse order and output sequences
     // in forward order
- detail::execute_all( detail::call_close(device_, BOOST_IOS::in),
- detail::call_close(filter_, device_, BOOST_IOS::in),
- detail::call_close(filter_, device_, BOOST_IOS::out),
- detail::call_close(device_, BOOST_IOS::out) );
+ if (!is_convertible<filter_mode, dual_use>::value) {
+ detail::execute_all(
+ detail::call_close(device_, BOOST_IOS::in),
+ detail::call_close(filter_, device_, BOOST_IOS::in),
+ detail::call_close(filter_, device_, BOOST_IOS::out),
+ detail::call_close(device_, BOOST_IOS::out)
+ );
+ } else if (is_convertible<device_mode, input>::value) {
+ detail::execute_all(
+ detail::call_close(device_, BOOST_IOS::in),
+ detail::call_close(filter_, device_, BOOST_IOS::in)
+ );
+ } else {
+ detail::execute_all(
+ detail::call_close(filter_, device_, BOOST_IOS::out),
+ detail::call_close(device_, BOOST_IOS::out)
+ );
+ }
 }
 
 template<typename Filter, typename Device, typename Mode>
 void composite_device<Filter, Device, Mode>::close(BOOST_IOS::openmode which)
 {
     BOOST_STATIC_ASSERT((is_convertible<Mode, two_sequence>::value));
+ BOOST_STATIC_ASSERT(
+ !(is_convertible<filter_mode, dual_use>::value) ||
+ !(is_convertible<device_mode, input>::value) ||
+ !(is_convertible<device_mode, output>::value)
+ );
 
     // Close input sequences in reverse order
- if (which == BOOST_IOS::in)
+ if ( which == BOOST_IOS::in &&
+ ( !is_convertible<filter_mode, dual_use>::value ||
+ is_convertible<device_mode, input>::value ) )
+ {
         detail::execute_all(
             detail::call_close(device_, BOOST_IOS::in),
             detail::call_close(filter_, device_, BOOST_IOS::in)
         );
+ }
 
     // Close output sequences in forward order
- if (which == BOOST_IOS::out)
+ if ( which == BOOST_IOS::out &&
+ ( !is_convertible<filter_mode, dual_use>::value ||
+ is_convertible<device_mode, output>::value ) )
+ {
         detail::execute_all(
             detail::call_close(filter_, device_, BOOST_IOS::out),
             detail::call_close(device_, BOOST_IOS::out)
         );
+ }
 }
 
 template<typename Filter, typename Device, typename Mode>

Modified: branches/iostreams_dev/boost/iostreams/detail/config/disable_warnings.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/detail/config/disable_warnings.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/detail/config/disable_warnings.hpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -18,6 +18,7 @@
 #else
 # if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
 # pragma warn -8008 // Condition always true/false.
+# pragma warn -8066 // Unreachable code.
 # pragma warn -8071 // Conversion may lose significant digits.
 # pragma warn -8072 // Suspicious pointer arithmetic.
 # pragma warn -8080 // identifier declared but never used.

Modified: branches/iostreams_dev/boost/iostreams/detail/config/enable_warnings.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/detail/config/enable_warnings.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/detail/config/enable_warnings.hpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -9,7 +9,9 @@
 #else
 # if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
 # pragma warn .8008 // Condition always true/false.
+# pragma warn .8066 // Unreachable code.
 # pragma warn .8071 // Conversion may lose significant digits.
+# pragma warn .8072 // Suspicious pointer arithmetic.
 # pragma warn .8080 // identifier declared but never used.
 # endif
 #endif

Modified: branches/iostreams_dev/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/detail/streambuf/indirect_streambuf.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/detail/streambuf/indirect_streambuf.hpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -374,7 +374,11 @@
         sync();
         setp(0, 0);
     }
- obj().close(which, next_);
+ if ( !is_convertible<category, dual_use>::value ||
+ is_convertible<Mode, input>::value == (which == BOOST_IOS::in) )
+ {
+ obj().close(which, next_);
+ }
 }
 
 //----------State changing functions------------------------------------------//

Modified: branches/iostreams_dev/boost/iostreams/filter/gzip.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/filter/gzip.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/filter/gzip.hpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -251,6 +251,8 @@
                 throw;
             }
             close_impl();
+ } else {
+ close_impl();
         }
     }
 private:

Modified: branches/iostreams_dev/boost/iostreams/filter/newline.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/filter/newline.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/filter/newline.hpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -215,8 +215,7 @@
         typedef typename iostreams::category_of<Sink>::type category;
         if ((flags_ & f_write) != 0 && (flags_ & f_has_CR) != 0)
             newline_if_sink(dest);
- if (which == BOOST_IOS::out)
- flags_ &= newline::platform_mask;
+ flags_ &= ~f_has_LF; // Restore original flags.
     }
 private:
 
@@ -402,24 +401,21 @@
     {
         using iostreams::newline::final_newline;
 
- if (which == BOOST_IOS::out) {
-
- // Update final_newline flag.
- if ( (source() & f_has_CR) != 0 ||
- (source() & f_line_complete) != 0 )
- {
- source() |= final_newline;
- }
+ // Update final_newline flag.
+ if ( (source() & f_has_CR) != 0 ||
+ (source() & f_line_complete) != 0 )
+ {
+ source() |= final_newline;
+ }
 
- // Clear non-sticky flags.
- source() &= ~(f_has_CR | f_line_complete);
+ // Clear non-sticky flags.
+ source() &= ~(f_has_CR | f_line_complete);
 
- // Check for errors.
- if ( (target_ & final_newline) != 0 &&
- (source() & final_newline) == 0 )
- {
- fail();
- }
+ // Check for errors.
+ if ( (target_ & final_newline) != 0 &&
+ (source() & final_newline) == 0 )
+ {
+ fail();
         }
     }
 private:

Modified: branches/iostreams_dev/boost/iostreams/filter/symmetric.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/filter/symmetric.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/filter/symmetric.hpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -153,10 +153,7 @@
     template<typename Sink>
     void close(Sink& snk, BOOST_IOS::openmode which)
     {
- using namespace std;
- if ((state() & f_write) == 0 && which == BOOST_IOS::in)
- close_impl();
- if ((state() & f_write) != 0 && which == BOOST_IOS::out) {
+ if ((state() & f_write) != 0) {
 
             // Repeatedly invoke filter() with no input.
             try {
@@ -175,6 +172,8 @@
                 throw;
             }
             close_impl();
+ } else {
+ close_impl();
         }
     }
     SymmetricFilter& filter() { return *pimpl_; }

Modified: branches/iostreams_dev/libs/iostreams/test/close_test.cpp
==============================================================================
--- branches/iostreams_dev/libs/iostreams/test/close_test.cpp (original)
+++ branches/iostreams_dev/libs/iostreams/test/close_test.cpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -104,12 +104,13 @@
     {
         operation_sequence seq;
         chain<input> ch;
+ operation dummy;
 
         // Test chain::pop()
         ch.push(
             closable_filter<dual_use>(
                 seq.new_operation(2),
- seq.new_operation(3)
+ dummy
             )
         );
         ch.push(closable_device<input>(seq.new_operation(1)));
@@ -264,12 +265,13 @@
     {
         operation_sequence seq;
         chain<output> ch;
+ operation dummy;
 
         // Test chain::pop()
         ch.push(
             closable_filter<dual_use>(
- seq.new_operation(1),
- seq.new_operation(2)
+ dummy,
+ seq.new_operation(1)
             )
         );
         ch.push(closable_device<output>(seq.new_operation(3)));

Modified: branches/iostreams_dev/libs/iostreams/test/combine_test.cpp
==============================================================================
--- branches/iostreams_dev/libs/iostreams/test/combine_test.cpp (original)
+++ branches/iostreams_dev/libs/iostreams/test/combine_test.cpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -146,22 +146,23 @@
     {
         operation_sequence seq;
         chain<bidirectional> ch;
+ operation dummy;
         ch.push(
             io::combine(
                 closable_filter<dual_use>(
                     seq.new_operation(2),
- seq.new_operation(3)
+ dummy
                 ),
                 closable_filter<dual_use>(
- seq.new_operation(4),
- seq.new_operation(5)
+ dummy,
+ seq.new_operation(3)
                 )
             )
         );
         ch.push(
             closable_device<bidirectional>(
                 seq.new_operation(1),
- seq.new_operation(6)
+ seq.new_operation(4)
             )
         );
         BOOST_CHECK_NO_THROW(ch.reset());

Modified: branches/iostreams_dev/libs/iostreams/test/compose_test.cpp
==============================================================================
--- branches/iostreams_dev/libs/iostreams/test/compose_test.cpp (original)
+++ branches/iostreams_dev/libs/iostreams/test/compose_test.cpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -156,11 +156,12 @@
     {
         operation_sequence seq;
         chain<input> ch;
+ operation dummy;
         ch.push(
             io::compose(
                 closable_filter<dual_use>(
                     seq.new_operation(2),
- seq.new_operation(3)
+ dummy
                 ),
                 closable_device<input>(seq.new_operation(1))
             )
@@ -218,13 +219,14 @@
     {
         operation_sequence seq;
         chain<output> ch;
+ operation dummy;
         ch.push(
             io::compose(
                 closable_filter<dual_use>(
- seq.new_operation(1),
- seq.new_operation(2)
+ dummy,
+ seq.new_operation(1)
                 ),
- closable_device<output>(seq.new_operation(3))
+ closable_device<output>(seq.new_operation(2))
             )
         );
         BOOST_CHECK_NO_THROW(ch.reset());
@@ -320,11 +322,12 @@
     {
         operation_sequence seq;
         chain<input> ch;
+ operation dummy;
         ch.push(
             io::compose(
                 closable_filter<dual_use>(
                     seq.new_operation(3),
- seq.new_operation(4)
+ dummy
                 ),
                 closable_filter<input>(seq.new_operation(2))
             )
@@ -386,16 +389,17 @@
     {
         operation_sequence seq;
         chain<output> ch;
+ operation dummy;
         ch.push(
             io::compose(
                 closable_filter<dual_use>(
- seq.new_operation(1),
- seq.new_operation(2)
+ dummy,
+ seq.new_operation(1)
                 ),
- closable_filter<output>(seq.new_operation(3))
+ closable_filter<output>(seq.new_operation(2))
             )
         );
- ch.push(closable_device<output>(seq.new_operation(4)));
+ ch.push(closable_device<output>(seq.new_operation(3)));
         BOOST_CHECK_NO_THROW(ch.reset());
         BOOST_CHECK_OPERATION_SEQUENCE(seq);
     }
@@ -445,15 +449,16 @@
     {
         operation_sequence seq;
         chain<input> ch;
+ operation dummy;
         ch.push(
             io::compose(
                 closable_filter<dual_use>(
                     seq.new_operation(3),
- seq.new_operation(4)
+ dummy
                 ),
                 closable_filter<dual_use>(
                     seq.new_operation(2),
- seq.new_operation(5)
+ dummy
                 )
             )
         );
@@ -466,19 +471,20 @@
     {
         operation_sequence seq;
         chain<output> ch;
+ operation dummy;
         ch.push(
             io::compose(
                 closable_filter<dual_use>(
- seq.new_operation(2),
- seq.new_operation(3)
+ dummy,
+ seq.new_operation(1)
                 ),
                 closable_filter<dual_use>(
- seq.new_operation(1),
- seq.new_operation(4)
+ dummy,
+ seq.new_operation(2)
                 )
             )
         );
- ch.push(closable_device<output>(seq.new_operation(5)));
+ ch.push(closable_device<output>(seq.new_operation(3)));
         BOOST_CHECK_NO_THROW(ch.reset());
         BOOST_CHECK_OPERATION_SEQUENCE(seq);
     }

Modified: branches/iostreams_dev/libs/iostreams/test/copy_test.cpp
==============================================================================
--- branches/iostreams_dev/libs/iostreams/test/copy_test.cpp (original)
+++ branches/iostreams_dev/libs/iostreams/test/copy_test.cpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -68,7 +68,9 @@
         first.open(vector_source(src));
         second.open(vector_sink(dest));
         BOOST_CHECK_MESSAGE(
- boost::iostreams::copy(first, second) == src.size() && src == dest,
+ boost::iostreams::copy(first, second) ==
+ static_cast<streamsize>(src.size()) &&
+ src == dest,
             "failed copying from stream to stream"
         );
     }
@@ -81,7 +83,9 @@
         vector_sink out(dest);
         in.open(vector_source(src));
         BOOST_CHECK_MESSAGE(
- boost::iostreams::copy(in, out) == src.size() && src == dest,
+ boost::iostreams::copy(in, out) ==
+ static_cast<streamsize>(src.size()) &&
+ src == dest,
             "failed copying from stream to indirect sink"
         );
     }
@@ -94,7 +98,9 @@
         vector_ostream out;
         out.open(vector_sink(dest));
         BOOST_CHECK_MESSAGE(
- boost::iostreams::copy(in, out) == src.size() && src == dest,
+ boost::iostreams::copy(in, out) ==
+ static_cast<streamsize>(src.size()) &&
+ src == dest,
             "failed copying from indirect source to stream"
         );
     }
@@ -106,7 +112,9 @@
         vector_source in(src);
         vector_sink out(dest);
         BOOST_CHECK_MESSAGE(
- boost::iostreams::copy(in, out) == src.size() && src == dest,
+ boost::iostreams::copy(in, out) ==
+ static_cast<streamsize>(src.size()) &&
+ src == dest,
             "failed copying from indirect source to indirect sink"
         );
     }
@@ -118,7 +126,9 @@
         array_source in(&src[0], &src[0] + src.size());
         array_sink out(&dest[0], &dest[0] + dest.size());
         BOOST_CHECK_MESSAGE(
- boost::iostreams::copy(in, out) == src.size() && src == dest,
+ boost::iostreams::copy(in, out) ==
+ static_cast<streamsize>(src.size()) &&
+ src == dest,
             "failed copying from direct source to direct sink"
         );
     }
@@ -130,7 +140,9 @@
         array_source in(&src[0], &src[0] + src.size());
         vector_ostream out(dest);
         BOOST_CHECK_MESSAGE(
- boost::iostreams::copy(in, out) == src.size() && src == dest,
+ boost::iostreams::copy(in, out) ==
+ static_cast<streamsize>(src.size()) &&
+ src == dest,
             "failed copying from direct source to indirect sink"
         );
     }
@@ -143,7 +155,9 @@
         array_sink out(&dest[0], &dest[0] + dest.size());
         in.open(vector_source(src));
         BOOST_CHECK_MESSAGE(
- boost::iostreams::copy(in, out) == src.size() && src == dest,
+ boost::iostreams::copy(in, out) ==
+ static_cast<streamsize>(src.size()) &&
+ src == dest,
             "failed copying from indirect source to direct sink"
         );
     }

Modified: branches/iostreams_dev/libs/iostreams/test/detail/utf8_codecvt_facet.cpp
==============================================================================
--- branches/iostreams_dev/libs/iostreams/test/detail/utf8_codecvt_facet.cpp (original)
+++ branches/iostreams_dev/libs/iostreams/test/detail/utf8_codecvt_facet.cpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -236,7 +236,8 @@
 // wchar_t is defined as UCS2. The warnings are superfluous as
 // the specialization is never instantitiated with such compilers.
 template<>
-int get_cont_octet_out_count_impl<4>(wchar_t word){
+int get_cont_octet_out_count_impl<4>(wchar_t word)
+{
     if (word < 0x80) {
         return 0;
     }

Modified: branches/iostreams_dev/libs/iostreams/test/restrict_test.cpp
==============================================================================
--- branches/iostreams_dev/libs/iostreams/test/restrict_test.cpp (original)
+++ branches/iostreams_dev/libs/iostreams/test/restrict_test.cpp 2008-01-14 03:40:42 EST (Mon, 14 Jan 2008)
@@ -8,7 +8,6 @@
 // replace BOOST_RESTRICT with BOOST_IOSTREAMS_RESTRICT here, since that
 // would interfere with the oepration of the header
 // <boost/iostreams/restrict.hpp>
-
 #ifndef BOOST_RESTRICT
 # define BOOST_RESTRICT restrict
 # define BOOST_RESTRICT_HEADER <boost/iostreams/restrict.hpp>
@@ -633,11 +632,12 @@
     {
         operation_sequence seq;
         chain<input> ch;
+ operation dummy;
         ch.push(
             io::BOOST_RESTRICT(
                 closable_filter<dual_use>(
                     seq.new_operation(2),
- seq.new_operation(3)
+ dummy
                 ),
                 0
             )
@@ -651,16 +651,17 @@
     {
         operation_sequence seq;
         chain<output> ch;
+ operation dummy;
         ch.push(
             io::BOOST_RESTRICT(
                 closable_filter<dual_use>(
- seq.new_operation(1),
- seq.new_operation(2)
+ dummy,
+ seq.new_operation(1)
                 ),
                 0
             )
         );
- ch.push(closable_device<output>(seq.new_operation(3)));
+ ch.push(closable_device<output>(seq.new_operation(2)));
         BOOST_CHECK_NO_THROW(ch.reset());
         BOOST_CHECK_OPERATION_SEQUENCE(seq);
     }


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