Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2007-12-29 10:30:14


Author: danieljames
Date: 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
New Revision: 42338
URL: http://svn.boost.org/trac/boost/changeset/42338

Log:
Merge.
Added:
   branches/fix-links/libs/iostreams/test/stream_offset_32bit_test.cpp
      - copied unchanged from r42330, /trunk/libs/iostreams/test/stream_offset_32bit_test.cpp
   branches/fix-links/libs/iostreams/test/stream_offset_64bit_test.cpp
      - copied unchanged from r42330, /trunk/libs/iostreams/test/stream_offset_64bit_test.cpp
   branches/fix-links/libs/iostreams/test/stream_state_test.cpp
      - copied unchanged from r42330, /trunk/libs/iostreams/test/stream_state_test.cpp
   branches/fix-links/tools/build/v2/tools/intel-darwin.jam
      - copied unchanged from r42330, /trunk/tools/build/v2/tools/intel-darwin.jam
Removed:
   branches/fix-links/libs/iostreams/test/offset_test.cpp
   branches/fix-links/libs/iostreams/test/positioning_test.cpp
Properties modified:
   branches/fix-links/ (props changed)
Text files modified:
   branches/fix-links/boost/archive/basic_binary_iprimitive.hpp | 22 --
   branches/fix-links/boost/archive/basic_text_iarchive.hpp | 10 -
   branches/fix-links/boost/archive/impl/basic_binary_iprimitive.ipp | 3
   branches/fix-links/boost/archive/impl/text_iarchive_impl.ipp | 3
   branches/fix-links/boost/iostreams/close.hpp | 110 +++++++------
   branches/fix-links/boost/iostreams/code_converter.hpp | 2
   branches/fix-links/boost/iostreams/compose.hpp | 5
   branches/fix-links/boost/iostreams/copy.hpp | 56 ++++---
   branches/fix-links/boost/iostreams/detail/adapter/concept_adapter.hpp | 3
   branches/fix-links/boost/iostreams/detail/adapter/non_blocking_adapter.hpp | 1
   branches/fix-links/boost/iostreams/detail/codecvt_holder.hpp | 2
   branches/fix-links/boost/iostreams/detail/config/disable_warnings.hpp | 6
   branches/fix-links/boost/iostreams/detail/enable_if_stream.hpp | 5
   branches/fix-links/boost/iostreams/detail/functional.hpp | 104 ++++++++-----
   branches/fix-links/boost/iostreams/detail/vc6/close.hpp | 3
   branches/fix-links/boost/iostreams/device/file_descriptor.hpp | 14 +
   branches/fix-links/boost/iostreams/device/mapped_file.hpp | 16 +
   branches/fix-links/boost/iostreams/filter/regex.hpp | 2
   branches/fix-links/boost/iostreams/filter/stdio.hpp | 5
   branches/fix-links/boost/iostreams/filter/symmetric.hpp | 2
   branches/fix-links/boost/iostreams/filter/test.hpp | 1
   branches/fix-links/boost/iostreams/pipeline.hpp | 2
   branches/fix-links/boost/iostreams/read.hpp | 2
   branches/fix-links/boost/iostreams/restrict.hpp | 39 ++++-
   branches/fix-links/boost/iostreams/skip.hpp | 49 ++++-
   branches/fix-links/boost/serialization/utility.hpp | 1
   branches/fix-links/boost/utility/value_init.hpp | 24 --
   branches/fix-links/boost/xpressive/proto/make_expr.hpp | 3
   branches/fix-links/boost/xpressive/proto/operators.hpp | 1
   branches/fix-links/libs/interprocess/test/file_mapping_test.cpp | 1
   branches/fix-links/libs/iostreams/doc/tutorial/container_device.html | 4
   branches/fix-links/libs/iostreams/example/container_device.hpp | 6
   branches/fix-links/libs/iostreams/src/bzip2.cpp | 4
   branches/fix-links/libs/iostreams/src/file_descriptor.cpp | 28 ++
   branches/fix-links/libs/iostreams/src/zlib.cpp | 2
   branches/fix-links/libs/iostreams/test/Jamfile.v2 | 5
   branches/fix-links/libs/iostreams/test/close_test.cpp | 61 -------
   branches/fix-links/libs/iostreams/test/code_converter_test.cpp | 302 ++++++++++++++++++++--------------------
   branches/fix-links/libs/iostreams/test/copy_test.cpp | 137 ++++++++++++++---
   branches/fix-links/libs/iostreams/test/detail/closable.hpp | 8
   branches/fix-links/libs/iostreams/test/detail/filters.hpp | 2
   branches/fix-links/libs/iostreams/test/detail/null_padded_codecvt.hpp | 10 +
   branches/fix-links/libs/iostreams/test/detail/operation_sequence.hpp | 1
   branches/fix-links/libs/iostreams/test/detail/utf8_codecvt_facet.hpp | 2
   branches/fix-links/libs/iostreams/test/detail/verification.hpp | 91 +++++++++++
   branches/fix-links/libs/iostreams/test/execute_test.cpp | 50 ++++--
   branches/fix-links/libs/iostreams/test/file_descriptor_test.cpp | 24 +++
   branches/fix-links/libs/iostreams/test/operation_sequence_test.cpp | 2
   branches/fix-links/libs/iostreams/test/symmetric_filter_test.cpp | 2
   branches/fix-links/libs/serialization/test/test_complex.cpp | 8
   branches/fix-links/libs/utility/value_init_test.cpp | 7
   branches/fix-links/tools/build/v2/build/alias.jam | 3
   branches/fix-links/tools/build/v2/doc/src/advanced.xml | 6
   branches/fix-links/tools/build/v2/doc/src/reference.xml | 2
   branches/fix-links/tools/build/v2/doc/src/tasks.xml | 22 +-
   branches/fix-links/tools/build/v2/test/BoostBuild.py | 19 +-
   branches/fix-links/tools/build/v2/test/empty.jam | 4
   branches/fix-links/tools/build/v2/test/inherit_toolset.py | 13
   branches/fix-links/tools/build/v2/test/readme.txt | 7
   branches/fix-links/tools/build/v2/test/searched_lib.py | 15 -
   branches/fix-links/tools/build/v2/test/test_system.html | 2
   branches/fix-links/tools/build/v2/test/timedata.py | 2
   branches/fix-links/tools/build/v2/tools/common.jam | 53 ++++--
   branches/fix-links/tools/build/v2/tools/gcc.jam | 2
   branches/fix-links/tools/build/v2/tools/intel.jam | 7
   branches/fix-links/tools/build/v2/tools/testing.jam | 2
   branches/fix-links/tools/build/v2/util/option.jam | 2
   branches/fix-links/tools/jam/doc/bjam.qbk | 2
   68 files changed, 857 insertions(+), 559 deletions(-)

Modified: branches/fix-links/boost/archive/basic_binary_iprimitive.hpp
==============================================================================
--- branches/fix-links/boost/archive/basic_binary_iprimitive.hpp (original)
+++ branches/fix-links/boost/archive/basic_binary_iprimitive.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -137,28 +137,6 @@
     void *address,
     std::size_t count
 ){
-#if 0
- assert(
- static_cast<std::size_t>((std::numeric_limits<std::streamsize>::max)()) >= count
- );
- //if(is.fail())
- // boost::throw_exception(archive_exception(archive_exception::stream_error));
- // note: an optimizer should eliminate the following for char files
- std::size_t s = count / sizeof(BOOST_DEDUCED_TYPENAME IStream::char_type);
- is.read(
- static_cast<BOOST_DEDUCED_TYPENAME IStream::char_type *>(address),
- s
- );
- // note: an optimizer should eliminate the following for char files
- s = count % sizeof(BOOST_DEDUCED_TYPENAME IStream::char_type);
- if(0 < s){
- if(is.fail())
- boost::throw_exception(archive_exception(archive_exception::stream_error));
- BOOST_DEDUCED_TYPENAME IStream::char_type t;
- is.read(& t, 1);
- std::memcpy(address, &t, s);
- }
-#endif
     // note: an optimizer should eliminate the following for char files
     std::streamsize s = count / sizeof(Elem);
     std::streamsize scount = m_sb.sgetn(

Modified: branches/fix-links/boost/archive/basic_text_iarchive.hpp
==============================================================================
--- branches/fix-links/boost/archive/basic_text_iarchive.hpp (original)
+++ branches/fix-links/boost/archive/basic_text_iarchive.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -61,16 +61,6 @@
     {
         this->detail_common_iarchive::load_override(t, 0);
     }
-#if 0
- // Borland compilers has a problem with strong type. Try to fix this here
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- void load_override(version_type & t, int){
- unsigned int x;
- * this->This() >> x;
- t.t = version_type(x);
- }
- #endif
-#endif
     // text file don't include the optional information
     void load_override(class_id_optional_type & /*t*/, int){}
 

Modified: branches/fix-links/boost/archive/impl/basic_binary_iprimitive.ipp
==============================================================================
--- branches/fix-links/boost/archive/impl/basic_binary_iprimitive.ipp (original)
+++ branches/fix-links/boost/archive/impl/basic_binary_iprimitive.ipp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -95,7 +95,8 @@
     #endif
         s.resize(l);
     // note breaking a rule here - could be a problem on some platform
- load_binary(&(*s.begin()), l);
+ if(0 < l)
+ load_binary(&(*s.begin()), l);
 }
 
 #ifndef BOOST_NO_CWCHAR

Modified: branches/fix-links/boost/archive/impl/text_iarchive_impl.ipp
==============================================================================
--- branches/fix-links/boost/archive/impl/text_iarchive_impl.ipp (original)
+++ branches/fix-links/boost/archive/impl/text_iarchive_impl.ipp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -53,7 +53,8 @@
     if(NULL != s.data())
     #endif
         s.resize(size);
- is.read(&(*s.begin()), size);
+ if(0 < size)
+ is.read(&(*s.begin()), size);
 }
 
 #ifndef BOOST_NO_CWCHAR

Modified: branches/fix-links/boost/iostreams/close.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/close.hpp (original)
+++ branches/fix-links/boost/iostreams/close.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -30,6 +30,51 @@
 // Must come last.
 #include <boost/iostreams/detail/config/disable_warnings.hpp>
 
+namespace boost { namespace iostreams {
+
+template<typename T>
+void close(T& t);
+
+template<typename T>
+void close(T& t, BOOST_IOS::openmode which);
+
+template<typename T, typename Sink>
+void close(T& t, Sink& snk, BOOST_IOS::openmode which);
+
+namespace detail {
+
+template<typename T>
+void close_all(T& t)
+{
+ try {
+ boost::iostreams::close(t, BOOST_IOS::in);
+ } catch (...) {
+ try {
+ boost::iostreams::close(t, BOOST_IOS::out);
+ } catch (...) { }
+ throw;
+ }
+ boost::iostreams::close(t, BOOST_IOS::out);
+}
+
+template<typename T, typename Sink>
+void close_all(T& t, Sink& snk)
+{
+ try {
+ boost::iostreams::close(t, snk, BOOST_IOS::in);
+ } catch (...) {
+ try {
+ boost::iostreams::close(t, snk, BOOST_IOS::out);
+ } catch (...) { }
+ throw;
+ }
+ boost::iostreams::close(t, snk, BOOST_IOS::out);
+}
+
+} // End namespaces detail.
+
+} } // End namespaces iostreams, boost.
+
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------//
 # include <boost/iostreams/detail/vc6/close.hpp>
 #else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------//
@@ -44,29 +89,33 @@
 } // End namespace detail.
 
 template<typename T>
-void close(T& t);
+void close(T& t) { detail::close_all(t); }
 
 template<typename T>
 void close(T& t, BOOST_IOS::openmode which)
 {
+#ifdef BOOST_IOSTREAMS_STRICT
     assert(which == BOOST_IOS::in || which == BOOST_IOS::out);
+#else
+ if (which == (BOOST_IOS::in | BOOST_IOS::out)) {
+ detail::close_all(t);
+ return;
+ }
+#endif
     detail::close_impl<T>::close(detail::unwrap(t), which);
 }
 
-//template<typename T, typename Sink>
-//void close( T& t, Sink& snk,
-// typename
-// boost::disable_if<
-// boost::is_convertible<Sink, BOOST_IOS::openmode>
-// >::type* = 0 )
-//{
-// detail::close_all(t, snk);
-//}
-
 template<typename T, typename Sink>
 void close(T& t, Sink& snk, BOOST_IOS::openmode which)
 {
+#ifdef BOOST_IOSTREAMS_STRICT
     assert(which == BOOST_IOS::in || which == BOOST_IOS::out);
+#else
+ if (which == (BOOST_IOS::in | BOOST_IOS::out)) {
+ detail::close_all(t, snk);
+ return;
+ }
+#endif
     detail::close_impl<T>::close(detail::unwrap(t), snk, which);
 }
 
@@ -163,45 +212,6 @@
 
 #endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------//
 
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename T>
-void close_all(T& t)
-{
- try {
- boost::iostreams::close(t, BOOST_IOS::in);
- } catch (...) {
- try {
- boost::iostreams::close(t, BOOST_IOS::out);
- } catch (...) { }
- throw;
- }
- boost::iostreams::close(t, BOOST_IOS::out);
-}
-
-template<typename T, typename Sink>
-void close_all(T& t, Sink& snk)
-{
- try {
- boost::iostreams::close(t, snk, BOOST_IOS::in);
- } catch (...) {
- try {
- boost::iostreams::close(t, snk, BOOST_IOS::out);
- } catch (...) { }
- throw;
- }
- boost::iostreams::close(t, snk, BOOST_IOS::out);
-}
-
-} // End namespaces detail.
-
-template<typename T>
-void close(T& t) { detail::close_all(t); }
-
-} } // End iostreams, boost.
-
 #include <boost/iostreams/detail/config/enable_warnings.hpp>
 
 #endif // #ifndef BOOST_IOSTREAMS_CLOSE_HPP_INCLUDED

Modified: branches/fix-links/boost/iostreams/code_converter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/code_converter.hpp (original)
+++ branches/fix-links/boost/iostreams/code_converter.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -37,10 +37,10 @@
 #include <boost/iostreams/detail/forward.hpp>
 #include <boost/iostreams/detail/functional.hpp>
 #include <boost/iostreams/detail/ios.hpp> // failure, openmode, int types.
+#include <boost/iostreams/detail/optional.hpp>
 #include <boost/iostreams/detail/select.hpp>
 #include <boost/iostreams/traits.hpp>
 #include <boost/iostreams/operations.hpp>
-#include <boost/optional.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/is_convertible.hpp>

Modified: branches/fix-links/boost/iostreams/compose.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/compose.hpp (original)
+++ branches/fix-links/boost/iostreams/compose.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -29,6 +29,9 @@
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
+// Must come last.
+#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
+
 namespace boost { namespace iostreams {
 
 namespace detail {
@@ -421,4 +424,6 @@
 
 } } // End namespaces iostreams, boost.
 
+#include <boost/iostreams/detail/config/enable_warnings.hpp>
+
 #endif // #ifndef BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED

Modified: branches/fix-links/boost/iostreams/copy.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/copy.hpp (original)
+++ branches/fix-links/boost/iostreams/copy.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -18,7 +18,9 @@
 # pragma once
 #endif
 
-#include <algorithm> // copy.
+#include <boost/config.hpp> // Make sure ptrdiff_t is in std.
+#include <algorithm> // copy, min.
+#include <cstddef> // ptrdiff_t.
 #include <utility> // pair.
 #include <boost/bind.hpp>
 #include <boost/detail/workaround.hpp>
@@ -57,12 +59,12 @@
     typedef pair<char_type*, char_type*> pair_type;
     pair_type p1 = iostreams::input_sequence(src);
     pair_type p2 = iostreams::output_sequence(snk);
- if (p1.second - p1.first < p2.second - p2.first) {
- std::copy(p1.first, p1.second, p2.first);
- return static_cast<streamsize>(p1.second - p1.first);
- } else {
- throw BOOST_IOSTREAMS_FAILURE("destination too small");
- }
+ streamsize total =
+ static_cast<streamsize>(
+ (std::min)(p1.second - p1.first, p2.second - p2.first)
+ );
+ std::copy(p1.first, p1.first + total, p2.first);
+ return total;
 }
 
 // Copy from a direct source to an indirect sink
@@ -83,7 +85,7 @@
             iostreams::write(snk, p.first + total, size - total);
         total += amt;
     }
- return size;
+ return total;
 }
 
 // Copy from an indirect source to a direct sink
@@ -98,23 +100,28 @@
     detail::basic_buffer<char_type> buf(buffer_size);
     pair_type p = snk.output_sequence();
     streamsize total = 0;
- bool done = false;
- while (!done) {
- streamsize amt;
- done = (amt = iostreams::read(src, buf.data(), buffer_size)) == -1;
+ ptrdiff_t capacity = p.second - p.first;
+ while (true) {
+ streamsize amt =
+ iostreams::read(
+ src,
+ buf.data(),
+ (std::min)(buffer_size, capacity - total)
+ );
+ if (amt == -1)
+ break;
         std::copy(buf.data(), buf.data() + amt, p.first + total);
- if (amt != -1)
- total += amt;
+ total += amt;
     }
     return total;
 }
 
-// Copy from an indirect source to a direct sink
+// Copy from an indirect source to an indirect sink
 template<typename Source, typename Sink>
 std::streamsize copy_impl( Source& src, Sink& snk,
                            std::streamsize buffer_size,
                            mpl::false_, mpl::false_ )
-{ // This algorithm can be improved by eliminating the non_blocking_adapter.
+{
     typedef typename char_type_of<Source>::type char_type;
     detail::basic_buffer<char_type> buf(buffer_size);
     non_blocking_adapter<Sink> nb(snk);
@@ -138,19 +145,22 @@
 // Function object that delegates to one of the above four
 // overloads of compl_impl()
 template<typename Source, typename Sink>
-struct copy_operation {
+class copy_operation {
+public:
     typedef std::streamsize result_type;
     copy_operation(Source& src, Sink& snk, std::streamsize buffer_size)
- : src(src), snk(snk), buffer_size(buffer_size)
+ : src_(src), snk_(snk), buffer_size_(buffer_size)
         { }
     std::streamsize operator()()
     {
- return copy_impl( src, snk, buffer_size,
+ return copy_impl( src_, snk_, buffer_size_,
                           is_direct<Source>(), is_direct<Sink>() );
     }
- Source& src;
- Sink& snk;
- std::streamsize buffer_size;
+private:
+ copy_operation& operator=(const copy_operation&);
+ Source& src_;
+ Sink& snk_;
+ std::streamsize buffer_size_;
 };
 
 // Primary overload of copy_impl. Delegates to one of the above four
@@ -218,7 +228,7 @@
 {
     typedef typename char_type_of<Source>::type char_type;
     return detail::copy_impl( detail::resolve<input, char_type>(src),
- detail::wrap(snk), buffer_size);
+ detail::wrap(snk), buffer_size );
 }
 
 // Overload of copy() for the case where neither the source nor the sink is

Modified: branches/fix-links/boost/iostreams/detail/adapter/concept_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/concept_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/concept_adapter.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -114,6 +114,7 @@
     std::streamsize optimal_buffer_size() const
     { return iostreams::optimal_buffer_size(t_); }
 public:
+ concept_adapter& operator=(const concept_adapter&);
     value_type t_;
 };
 
@@ -218,7 +219,7 @@
     template<typename Filter, typename Device>
     static std::streampos
     seek( Filter& f, Device* dev, stream_offset off,
- BOOST_IOS::seekdir way, BOOST_IOS::openmode which,
+ BOOST_IOS::seekdir way, BOOST_IOS::openmode,
           random_access, any_tag )
     { return f.seek(*dev, off, way); }
 

Modified: branches/fix-links/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/non_blocking_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/non_blocking_adapter.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -49,6 +49,7 @@
                              BOOST_IOS::in | BOOST_IOS::out )
     { return iostreams::seek(device_, off, way, which); }
 public:
+ non_blocking_adapter& operator=(const non_blocking_adapter&);
     Device& device_;
 };
 

Modified: branches/fix-links/boost/iostreams/detail/codecvt_holder.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/codecvt_holder.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/codecvt_holder.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -30,7 +30,7 @@
 struct codecvt_holder {
     typedef Codecvt codecvt_type;
     const codecvt_type& get() const { return codecvt_; }
- void imbue(const std::locale& loc) { }
+ void imbue(const std::locale&) { }
     Codecvt codecvt_;
 };
 

Modified: branches/fix-links/boost/iostreams/detail/config/disable_warnings.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/disable_warnings.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/disable_warnings.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -9,13 +9,17 @@
 
 #if defined(BOOST_MSVC)
 # pragma warning(push)
+# pragma warning(disable:4127) // Conditional expression is constant.
+# pragma warning(disable:4130) // Logical operation on address of string constant.
 # pragma warning(disable:4224) // Parameter previously defined as type.
 # pragma warning(disable:4244) // Conversion: possible loss of data.
+# pragma warning(disable:4512) // Assignment operator could not be generated.
+# pragma warning(disable:4706) // Assignment within conditional expression.
 #else
 # if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
 # pragma warn -8008 // Condition always true/false.
 # 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/fix-links/boost/iostreams/detail/enable_if_stream.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/enable_if_stream.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/enable_if_stream.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -15,9 +15,10 @@
 #include <boost/utility/enable_if.hpp>
 #include <boost/iostreams/traits_fwd.hpp> // is_std_io.
 
-#if ! defined(BOOST_NO_SFINAE) && ! BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
+#if !defined(BOOST_NO_SFINAE) && \
+ !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
 # define BOOST_IOSTREAMS_ENABLE_IF_STREAM(T) \
- , typename boost::enable_if< boost::iostreams::is_std_io<T> >::type* = 0 \
+ , typename boost::enable_if< boost::iostreams::is_std_io<T> >::type* = 0 \
     /**/
 # define BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) \
     , typename boost::disable_if< boost::iostreams::is_std_io<T> >::type* = 0 \

Modified: branches/fix-links/boost/iostreams/detail/functional.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/functional.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/functional.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -29,26 +29,32 @@
     // boost::iostreams::close
 
 template<typename T>
-struct device_close_operation {
+class device_close_operation {
+public:
     typedef void result_type;
     device_close_operation(T& t, BOOST_IOS::openmode which)
- : t(t), which(which)
+ : t_(t), which_(which)
         { }
- void operator()() const { boost::iostreams::close(t, which); }
- T& t;
- BOOST_IOS::openmode which;
+ void operator()() const { boost::iostreams::close(t_, which_); }
+private:
+ device_close_operation& operator=(const device_close_operation&);
+ T& t_;
+ BOOST_IOS::openmode which_;
 };
 
 template<typename T, typename Sink>
-struct filter_close_operation {
+class filter_close_operation {
+public:
     typedef void result_type;
     filter_close_operation(T& t, Sink& snk, BOOST_IOS::openmode which)
- : t(t), snk(snk), which(which)
+ : t_(t), snk_(snk), which_(which)
         { }
- void operator()() const { boost::iostreams::close(t, snk, which); }
- T& t;
- Sink& snk;
- BOOST_IOS::openmode which;
+ void operator()() const { boost::iostreams::close(t_, snk_, which_); }
+private:
+ filter_close_operation& operator=(const filter_close_operation&);
+ T& t_;
+ Sink& snk_;
+ BOOST_IOS::openmode which_;
 };
 
 template<typename T>
@@ -65,20 +71,26 @@
     // boost::iostreams::detail::close_all
 
 template<typename T>
-struct device_close_all_operation {
+class device_close_all_operation {
+public:
     typedef void result_type;
- device_close_all_operation(T& t) : t(t) { }
- void operator()() const { detail::close_all(t); }
- T& t;
+ device_close_all_operation(T& t) : t_(t) { }
+ void operator()() const { detail::close_all(t_); }
+private:
+ device_close_all_operation& operator=(const device_close_all_operation&);
+ T& t_;
 };
 
 template<typename T, typename Sink>
-struct filter_close_all_operation {
+class filter_close_all_operation {
+public:
     typedef void result_type;
- filter_close_all_operation(T& t, Sink& snk) : t(t), snk(snk) { }
- void operator()() const { detail::close_all(t, snk); }
- T& t;
- Sink& snk;
+ filter_close_all_operation(T& t, Sink& snk) : t_(t), snk_(snk) { }
+ void operator()() const { detail::close_all(t_, snk_); }
+private:
+ filter_close_all_operation& operator=(const filter_close_all_operation&);
+ T& t_;
+ Sink& snk_;
 };
 
 template<typename T>
@@ -94,14 +106,17 @@
     // member function void close(std::ios_base::openmode)
 
 template<typename T>
-struct member_close_operation {
+class member_close_operation {
+public:
     typedef void result_type;
     member_close_operation(T& t, BOOST_IOS::openmode which)
- : t(t), which(which)
+ : t_(t), which_(which)
         { }
- void operator()() const { t.close(which); }
- T& t;
- BOOST_IOS::openmode which;
+ void operator()() const { t_.close(which_); }
+private:
+ member_close_operation& operator=(const member_close_operation&);
+ T& t_;
+ BOOST_IOS::openmode which_;
 };
 
 template<typename T>
@@ -112,10 +127,13 @@
     // member function void reset()
 
 template<typename T>
-struct reset_operation {
- reset_operation(T& t) : t(t) { }
- void operator()() const { t.reset(); }
- T& t;
+class reset_operation {
+public:
+ reset_operation(T& t) : t_(t) { }
+ void operator()() const { t_.reset(); }
+private:
+ reset_operation& operator=(const reset_operation&);
+ T& t_;
 };
 
 template<typename T>
@@ -124,11 +142,14 @@
     // Function object and object generator for clearing a flag
 
 template<typename T>
-struct clear_flags_operation {
+class clear_flags_operation {
+public:
     typedef void result_type;
- clear_flags_operation(T& t) : t(t) { }
- void operator()() const { t = 0; }
- T& t;
+ clear_flags_operation(T& t) : t_(t) { }
+ void operator()() const { t_ = 0; }
+private:
+ clear_flags_operation& operator=(const clear_flags_operation&);
+ T& t_;
 };
 
 template<typename T>
@@ -139,19 +160,22 @@
 
 // Function object for use with execute_all()
 template<typename Buffer, typename Device>
-struct flush_buffer_operation {
+class flush_buffer_operation {
+public:
     typedef void result_type;
     flush_buffer_operation(Buffer& buf, Device& dev, bool flush)
- : buf(buf), dev(dev), flush(flush)
+ : buf_(buf), dev_(dev), flush_(flush)
         { }
     void operator()() const
     {
- if (flush)
- buf.flush(dev);
+ if (flush_)
+ buf_.flush(dev_);
     }
- Buffer& buf;
- Device& dev;
- bool flush;
+private:
+ flush_buffer_operation& operator=(const flush_buffer_operation&);
+ Buffer& buf_;
+ Device& dev_;
+ bool flush_;
 };
 
 template<typename Buffer, typename Device>

Modified: branches/fix-links/boost/iostreams/detail/vc6/close.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/vc6/close.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/vc6/close.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -14,6 +14,9 @@
 } // End namespace detail.
 
 template<typename T>
+void close(T& t) { detail::close_all(t); }
+
+template<typename T>
 void close(T& t, BOOST_IOS::openmode which)
 {
     typedef typename detail::unwrapped_type<T>::type unwrapped;

Modified: branches/fix-links/boost/iostreams/device/file_descriptor.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/device/file_descriptor.hpp (original)
+++ branches/fix-links/boost/iostreams/device/file_descriptor.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -102,8 +102,13 @@
     typedef void* handle_type;
 #endif
     typedef char char_type;
- struct category : public source_tag, closable_tag { };
+ struct category
+ : input_seekable,
+ device_tag,
+ closable_tag
+ { };
     using file_descriptor::read;
+ using file_descriptor::seek;
     using file_descriptor::open;
     using file_descriptor::is_open;
     using file_descriptor::close;
@@ -128,8 +133,13 @@
     typedef void* handle_type;
 #endif
     typedef char char_type;
- struct category : public sink_tag, closable_tag { };
+ struct category
+ : output_seekable,
+ device_tag,
+ closable_tag
+ { };
     using file_descriptor::write;
+ using file_descriptor::seek;
     using file_descriptor::open;
     using file_descriptor::is_open;
     using file_descriptor::close;

Modified: branches/fix-links/boost/iostreams/device/mapped_file.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/device/mapped_file.hpp (original)
+++ branches/fix-links/boost/iostreams/device/mapped_file.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -62,12 +62,22 @@
 
 struct mapped_file_params {
     explicit mapped_file_params()
- : mode(), offset(0), length(static_cast<std::size_t>(-1)),
+ #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) && defined(BOOST_RWSTD_VER)
+ : mode(std::ios_base::openmode(0)),
+ #else
+ : mode(),
+ #endif
+ offset(0), length(static_cast<std::size_t>(-1)),
           new_file_size(0), hint(0)
         { }
     explicit mapped_file_params(const std::string& path)
- : path(path), mode(), offset(0),
- length(static_cast<std::size_t>(-1)),
+ : path(path),
+ #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) && defined(BOOST_RWSTD_VER)
+ mode(std::ios_base::openmode(0)),
+ #else
+ mode(),
+ #endif
+ offset(0), length(static_cast<std::size_t>(-1)),
           new_file_size(0), hint(0)
         { }
     std::string path;

Modified: branches/fix-links/boost/iostreams/filter/regex.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/regex.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/regex.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -72,7 +72,7 @@
         }
     struct simple_formatter {
         simple_formatter(const string_type& fmt, flag_type fmt_flags)
- : fmt_(fmt), fmt_flags_(fmt_flags_) { }
+ : fmt_(fmt), fmt_flags_(fmt_flags) { }
         string_type operator() (const match_type& match) const
         { return match.format(fmt_, fmt_flags_); }
         string_type fmt_;

Modified: branches/fix-links/boost/iostreams/filter/stdio.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/stdio.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/stdio.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -56,8 +56,9 @@
             : ios_(ios), old_(ios.rdbuf(newbuf))
             { }
         ~scoped_redirector() { ios_.rdbuf(old_); }
- ios_type& ios_;
- streambuf_type* old_;
+ scoped_redirector& operator=(const scoped_redirector&);
+ ios_type& ios_;
+ streambuf_type* old_;
     };
 
     virtual void do_filter() = 0;

Modified: branches/fix-links/boost/iostreams/filter/symmetric.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/symmetric.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/symmetric.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -228,7 +228,7 @@
     }
 
     template<typename Sink>
- bool flush(Sink& snk, mpl::false_) { return true;}
+ bool flush(Sink&, mpl::false_) { return true;}
 
     void close_impl();
 

Modified: branches/fix-links/boost/iostreams/filter/test.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/test.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/test.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -133,6 +133,7 @@
         return amt;
     }
 private:
+ non_blocking_sink& operator=(const non_blocking_sink&);
     std::string& dest_;
     std::streamsize inc_;
 };

Modified: branches/fix-links/boost/iostreams/pipeline.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/pipeline.hpp (original)
+++ branches/fix-links/boost/iostreams/pipeline.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -80,6 +80,7 @@
     template<typename Chain>
     void push(Chain& chn) const { chn.push(component_); }
 private:
+ pipeline_segment operator=(const pipeline_segment&);
     const Component& component_;
 };
 
@@ -109,6 +110,7 @@
     const Pipeline& tail() const { return *this; }
     const Component& head() const { return component_; }
 private:
+ pipeline operator=(const pipeline&);
     const Component& component_;
 };
 

Modified: branches/fix-links/boost/iostreams/read.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/read.hpp (original)
+++ branches/fix-links/boost/iostreams/read.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -79,7 +79,7 @@
 template<>
 struct true_eof_impl<false> {
     template<typename T>
- static bool true_eof(T& t) { return true; }
+ static bool true_eof(T&) { return true; }
 };
 
 template<typename T>

Modified: branches/fix-links/boost/iostreams/restrict.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/restrict.hpp (original)
+++ branches/fix-links/boost/iostreams/restrict.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -31,7 +31,7 @@
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // VC7.1 C4244.
+#include <boost/iostreams/detail/config/disable_warnings.hpp>
 
 namespace boost { namespace iostreams {
 
@@ -49,9 +49,11 @@
 private:
     typedef typename detail::param_type<Device>::type param_type;
 public:
- typedef typename char_type_of<Device>::type char_type;
+ typedef typename char_type_of<Device>::type char_type;
+ typedef typename mode_of<Device>::type mode;
+ BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
     struct category
- : mode_of<Device>::type,
+ : mode,
           device_tag,
           closable_tag,
           flushable_tag,
@@ -78,6 +80,8 @@
 public:
     typedef typename char_type_of<Device>::type char_type;
     typedef std::pair<char_type*, char_type*> pair_type;
+ typedef typename mode_of<Device>::type mode;
+ BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
     struct category
         : mode_of<Device>::type,
           device_tag,
@@ -105,8 +109,10 @@
 class restricted_filter : public filter_adapter<Filter> {
 public:
     typedef typename char_type_of<Filter>::type char_type;
+ typedef typename mode_of<Filter>::type mode;
+ BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
     struct category
- : mode_of<Filter>::type,
+ : mode,
           filter_tag,
           multichar_tag,
           closable_tag,
@@ -121,7 +127,7 @@
     {
         using namespace std;
         if (!open_)
- open(src);
+ open(src, BOOST_IOS::in);
         streamsize amt =
             end_ != -1 ?
                 (std::min) (n, static_cast<streamsize>(end_ - pos_)) :
@@ -136,7 +142,7 @@
     std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
     {
         if (!open_)
- open(snk);
+ open(snk, BOOST_IOS::out);
         if (end_ != -1 && pos_ + n >= end_)
             bad_write();
         std::streamsize result =
@@ -167,13 +173,30 @@
         pos_ = this->component().seek(dev, next, BOOST_IOS::cur);
         return offset_to_position(pos_ - beg_);
     }
+
+ template<typename Device>
+ void close(Device& dev)
+ {
+ open_ = false;
+ detail::close_all(this->component(), dev);
+ }
+
+ template<typename Device>
+ void close(Device& dev, BOOST_IOS::openmode which)
+ {
+ open_ = false;
+ iostreams::close(this->component(), dev, which);
+ }
 private:
     template<typename Device>
- void open(Device& dev)
+ void open(Device& dev, BOOST_IOS::openmode which)
     {
+ typedef typename is_convertible<mode, dual_use>::type is_dual_use;
         open_ = true;
- iostreams::skip(this->component(), dev, beg_);
+ which = is_dual_use() ? which : (BOOST_IOS::in | BOOST_IOS::out);
+ iostreams::skip(this->component(), dev, beg_, which);
     }
+
     stream_offset beg_, pos_, end_;
     bool open_;
 };

Modified: branches/fix-links/boost/iostreams/skip.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/skip.hpp (original)
+++ branches/fix-links/boost/iostreams/skip.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -16,9 +16,11 @@
 #include <boost/iostreams/char_traits.hpp>
 #include <boost/iostreams/detail/ios.hpp> // failure.
 #include <boost/iostreams/operations.hpp>
+#include <boost/iostreams/seek.hpp>
 #include <boost/iostreams/traits.hpp>
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/or.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
 namespace boost { namespace iostreams {
@@ -44,11 +46,13 @@
 }
 
 template<typename Filter, typename Device>
-void skip(Filter& flt, Device& dev, stream_offset off, mpl::true_)
-{ flt.seek(dev, off, BOOST_IOS::cur); }
+void skip( Filter& flt, Device& dev, stream_offset off,
+ BOOST_IOS::openmode which, mpl::true_ )
+{ boost::iostreams::seek(flt, dev, off, BOOST_IOS::cur, which); }
 
 template<typename Filter, typename Device>
-void skip(Filter& flt, Device& dev, stream_offset off, mpl::false_)
+void skip( Filter& flt, Device& dev, stream_offset off,
+ BOOST_IOS::openmode, mpl::false_ )
 {
     typedef typename char_type_of<Device>::type char_type;
     char_type c;
@@ -66,20 +70,39 @@
 template<typename Device>
 void skip(Device& dev, stream_offset off)
 {
- typedef typename mode_of<Device>::type mode;
- detail::skip(dev, off, is_convertible<mode, seekable>());
+ typedef typename mode_of<Device>::type mode;
+ typedef mpl::or_<
+ is_convertible<mode, input_seekable>,
+ is_convertible<mode, output_seekable>
+ > can_seek;
+ BOOST_STATIC_ASSERT(
+ (can_seek::value || is_convertible<mode, input>::value)
+ );
+ detail::skip(dev, off, can_seek());
 }
 
 template<typename Filter, typename Device>
-void skip(Filter& flt, Device& dev, stream_offset off)
+void skip( Filter& flt, Device& dev, stream_offset off,
+ BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out )
 {
- typedef typename mode_of<Filter>::type filter_mode;
- typedef typename mode_of<Device>::type device_mode;
- typedef mpl::and_<
- is_convertible<filter_mode, output_seekable>,
- is_convertible<device_mode, output_seekable>
- > can_seek;
- detail::skip(flt, dev, off, can_seek());
+ typedef typename mode_of<Filter>::type filter_mode;
+ typedef typename mode_of<Device>::type device_mode;
+ typedef mpl::or_<
+ mpl::and_<
+ is_convertible<filter_mode, input_seekable>,
+ is_convertible<device_mode, input_seekable>
+ >,
+ mpl::and_<
+ is_convertible<filter_mode, output_seekable>,
+ is_convertible<device_mode, output_seekable>
+ >
+ > can_seek;
+ BOOST_STATIC_ASSERT(
+ ( can_seek::value ||
+ is_convertible<filter_mode, input>::value &&
+ is_convertible<device_mode, input>::value )
+ );
+ detail::skip(flt, dev, off, which, can_seek());
 }
 
 } } // End namespaces iostreams, boost.

Modified: branches/fix-links/boost/serialization/utility.hpp
==============================================================================
--- branches/fix-links/boost/serialization/utility.hpp (original)
+++ branches/fix-links/boost/serialization/utility.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -23,6 +23,7 @@
 #include <boost/type_traits/remove_const.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/is_bitwise_serializable.hpp>
+#include <boost/mpl/and.hpp>
 
 namespace boost {
 namespace serialization {

Modified: branches/fix-links/boost/utility/value_init.hpp
==============================================================================
--- branches/fix-links/boost/utility/value_init.hpp (original)
+++ branches/fix-links/boost/utility/value_init.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -5,9 +5,7 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 // 21 Ago 2002 (Created) Fernando Cacciola
-// 07 Set 2007 (Worked around MSVC++ bug) Fernando Cacciola, Niels Dekker
-// 16 Nov 2007 (Refactoring: removed private base classes) Fernando Cacciola, Niels Dekker
-// 09 Dec 2007 (Worked around various compiler bugs) Fernando Cacciola, Niels Dekker
+// 24 Dec 2007 (Refactored and worked around various compiler bugs) Fernando Cacciola, Niels Dekker
 //
 #ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
 #define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
@@ -30,7 +28,6 @@
 // clearing the bytes of T, before constructing the T object it contains.
 
 #include <boost/aligned_storage.hpp>
-#include <boost/detail/select_type.hpp>
 #include <boost/detail/workaround.hpp>
 #include <boost/type_traits/cv_traits.hpp>
 #include <boost/type_traits/alignment_of.hpp>
@@ -51,17 +48,13 @@
       remove_const<T>::type data;
     };
 
- mutable
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
- typename
-#endif
- ::boost::aligned_storage<sizeof(wrapper), ::boost::alignment_of<wrapper>::value>::type x;
+ mutable aligned_storage<sizeof(wrapper), alignment_of<wrapper>::value> x;
 
   public :
 
     value_initialized()
     {
- std::memset(&x, 0, sizeof(x));
+ std::memset(x.address(), 0, sizeof(x));
 #ifdef BOOST_MSVC
 #pragma warning(push)
 #if _MSC_VER >= 1310
@@ -71,7 +64,7 @@
 #pragma warning(disable: 4345)
 #endif
 #endif
- new (&x) wrapper();
+ new (x.address()) wrapper();
 #ifdef BOOST_MSVC
 #pragma warning(pop)
 #endif
@@ -79,8 +72,7 @@
 
     value_initialized(value_initialized const & arg)
     {
- void const * const ptr = &(arg.x);
- new (&x) wrapper( *static_cast<wrapper const *>(ptr) );
+ new (x.address()) wrapper( *static_cast<wrapper const *>(arg.x.address()) );
     }
 
     value_initialized & operator=(value_initialized const & arg)
@@ -93,14 +85,12 @@
 
     ~value_initialized()
     {
- void * const ptr = &x;
- static_cast<wrapper *>(ptr)->wrapper::~wrapper();
+ static_cast<wrapper *>(x.address())->wrapper::~wrapper();
     }
 
     T& data() const
     {
- void * const ptr = &x;
- return static_cast<wrapper *>(ptr)->data;
+ return static_cast<wrapper *>(x.address())->data;
     }
 
     operator T&() const { return this->data(); }

Modified: branches/fix-links/boost/xpressive/proto/make_expr.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/make_expr.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/make_expr.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -40,6 +40,9 @@
     #include <boost/preprocessor/seq/seq.hpp>
     #include <boost/preprocessor/seq/to_tuple.hpp>
     #include <boost/preprocessor/seq/for_each_i.hpp>
+ #include <boost/preprocessor/seq/pop_back.hpp>
+ #include <boost/preprocessor/seq/push_back.hpp>
+ #include <boost/preprocessor/seq/push_front.hpp>
     #include <boost/preprocessor/list/for_each_i.hpp>
     #include <boost/ref.hpp>
     #include <boost/mpl/apply_wrap.hpp>

Modified: branches/fix-links/boost/xpressive/proto/operators.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/operators.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/operators.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -12,6 +12,7 @@
 
 #include <boost/xpressive/proto/detail/prefix.hpp>
 #include <boost/preprocessor/punctuation/comma.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
 #include <boost/mpl/or.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/type_traits/is_same.hpp>

Modified: branches/fix-links/libs/interprocess/test/file_mapping_test.cpp
==============================================================================
--- branches/fix-links/libs/interprocess/test/file_mapping_test.cpp (original)
+++ branches/fix-links/libs/interprocess/test/file_mapping_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -11,6 +11,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <fstream>
 #include <iostream>
+#include <ios>
 #include <boost/interprocess/file_mapping.hpp>
 #include <boost/interprocess/mapped_region.hpp>
 #include <memory>

Modified: branches/fix-links/libs/iostreams/doc/tutorial/container_device.html
==============================================================================
--- branches/fix-links/libs/iostreams/doc/tutorial/container_device.html (original)
+++ branches/fix-links/libs/iostreams/doc/tutorial/container_device.html 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -153,11 +153,13 @@
             next = pos_ + off;
         } <SPAN CLASS="keyword">else</SPAN> <SPAN CLASS="keyword">if</SPAN> (way == ios_bas::end) {
             next = container_.size() + off - <SPAN CLASS='numeric_literal'>1</SPAN>;
+ } <SPAN CLASS="keyword">else</SPAN> {
+ <SPAN CLASS="keyword">throw</SPAN> ios_base::failure(<SPAN CLASS='numeric_literal'>"bad seek direction"</SPAN>);
         }
 
         <SPAN CLASS='comment'>// Check for errors</SPAN>
         <SPAN CLASS="keyword">if</SPAN> (next < <SPAN CLASS='numeric_literal'>0</SPAN> || next >= container_.size())
- <SPAN CLASS="keyword">throw</SPAN> ios_base::failure("bad seek offset");
+ <SPAN CLASS="keyword">throw</SPAN> ios_base::failure(<SPAN CLASS='numeric_literal'>"bad seek offset"</SPAN>);
 
         pos_ = next;
         <SPAN CLASS="keyword">return</SPAN> pos_;

Modified: branches/fix-links/libs/iostreams/example/container_device.hpp
==============================================================================
--- branches/fix-links/libs/iostreams/example/container_device.hpp (original)
+++ branches/fix-links/libs/iostreams/example/container_device.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -8,6 +8,7 @@
 #define BOOST_IOSTREAMS_CONTAINTER_DEVICE_HPP_INCLUDED
 
 #include <algorithm> // copy, min.
+#include <cassert>
 #include <boost/config.hpp> // BOOST_NO_STDC_NAMESPACE.
 #include <boost/iostreams/categories.hpp>
 #include <boost/iostreams/detail/ios.hpp> // failure.
@@ -43,6 +44,7 @@
     }
     Container& container() { return container_; }
 private:
+ container_source operator=(const container_source&);
     typedef typename Container::size_type size_type;
     Container& container_;
     size_type pos_;
@@ -64,6 +66,7 @@
     }
     Container& container() { return container_; }
 private:
+ container_sink operator=(const container_sink&);
     Container& container_;
 };
 
@@ -124,6 +127,8 @@
             next = pos_ + off;
         } else if (way == BOOST_IOS::end) {
             next = container_.size() + off - 1;
+ } else {
+ throw BOOST_IOSTREAMS_FAILURE("bad seek direction");
         }
 
         // Check for errors
@@ -136,6 +141,7 @@
 
     Container& container() { return container_; }
 private:
+ container_device operator=(const container_device&);
     typedef typename Container::size_type size_type;
     Container& container_;
     size_type pos_;

Modified: branches/fix-links/libs/iostreams/src/bzip2.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/src/bzip2.cpp (original)
+++ branches/fix-links/libs/iostreams/src/bzip2.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -121,8 +121,8 @@
 void bzip2_base::do_init
     ( bool compress,
       #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- bzip2::alloc_func alloc,
- bzip2::free_func free,
+ bzip2::alloc_func /* alloc */,
+ bzip2::free_func /* free */,
       #endif
       void* derived )
 {

Modified: branches/fix-links/libs/iostreams/src/file_descriptor.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/src/file_descriptor.cpp (original)
+++ branches/fix-links/libs/iostreams/src/file_descriptor.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -12,6 +12,7 @@
 // than using it (possibly importing code).
 #define BOOST_IOSTREAMS_SOURCE
 
+#include <cassert>
 #include <boost/config.hpp> // BOOST_JOIN
 #include <boost/iostreams/detail/error.hpp>
 #include <boost/iostreams/detail/config/dyn_link.hpp>
@@ -31,6 +32,9 @@
 # include <io.h> // low-level file i/o.
 # define WINDOWS_LEAN_AND_MEAN
 # include <windows.h>
+# ifndef INVALID_SET_FILE_POINTER
+# define INVALID_SET_FILE_POINTER ((DWORD)-1)
+# endif
 #else
 # include <sys/types.h> // mode_t.
 # include <unistd.h> // low-level file i/o.
@@ -64,14 +68,16 @@
              ==
          (BOOST_IOS::in | BOOST_IOS::out) )
     {
- assert(!(m & BOOST_IOS::app));
+ if (m & BOOST_IOS::app)
+ throw BOOST_IOSTREAMS_FAILURE("bad open mode");
         dwDesiredAccess = GENERIC_READ | GENERIC_WRITE;
         dwCreationDisposition =
             (m & BOOST_IOS::trunc) ?
                 OPEN_ALWAYS :
                 OPEN_EXISTING;
     } else if (m & BOOST_IOS::in) {
- assert(!(m & (BOOST_IOS::app |BOOST_IOS::trunc)));
+ if (m & (BOOST_IOS::app |BOOST_IOS::trunc))
+ throw BOOST_IOSTREAMS_FAILURE("bad open mode");
         dwDesiredAccess = GENERIC_READ;
         dwCreationDisposition = OPEN_EXISTING;
     } else if (m & BOOST_IOS::out) {
@@ -79,6 +85,8 @@
         dwCreationDisposition = OPEN_ALWAYS;
         if (m & BOOST_IOS::app)
             pimpl_->flags_ |= impl::append;
+ } else {
+ throw BOOST_IOSTREAMS_FAILURE("bad open mode");
     }
 
     HANDLE handle =
@@ -159,9 +167,13 @@
 #ifdef BOOST_IOSTREAMS_WINDOWS
     if (pimpl_->flags_ & impl::has_handle) {
         if (pimpl_->flags_ & impl::append) {
- ::SetFilePointer(pimpl_->handle_, 0, NULL, FILE_END);
- if (::GetLastError() != NO_ERROR)
+ DWORD const dwResult =
+ ::SetFilePointer(pimpl_->handle_, 0, NULL, FILE_END);
+ if ( dwResult == INVALID_SET_FILE_POINTER &&
+ ::GetLastError() != NO_ERROR )
+ {
                 throw detail::bad_seek();
+ }
         }
         DWORD ignore;
         if (!::WriteFile(pimpl_->handle_, s, n, &ignore, NULL))
@@ -192,10 +204,14 @@
                                   way == BOOST_IOS::cur ?
                                     FILE_CURRENT :
                                     FILE_END );
- if (::GetLastError() != NO_ERROR) {
+ if ( dwResultLow == INVALID_SET_FILE_POINTER &&
+ ::GetLastError() != NO_ERROR )
+ {
             throw detail::bad_seek();
         } else {
- return offset_to_position((lDistanceToMoveHigh << 32) + dwResultLow);
+ return offset_to_position(
+ (stream_offset(lDistanceToMoveHigh) << 32) + dwResultLow
+ );
         }
     }
 #endif // #ifdef BOOST_IOSTREAMS_WINDOWS

Modified: branches/fix-links/libs/iostreams/src/zlib.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/src/zlib.cpp (original)
+++ branches/fix-links/libs/iostreams/src/zlib.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -153,7 +153,7 @@
 void zlib_base::do_init
     ( const zlib_params& p, bool compress,
       #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- zlib::alloc_func alloc, zlib::free_func free,
+ zlib::alloc_func /* alloc */, zlib::free_func /* free*/,
       #endif
       void* derived )
 {

Modified: branches/fix-links/libs/iostreams/test/Jamfile.v2
==============================================================================
--- branches/fix-links/libs/iostreams/test/Jamfile.v2 (original)
+++ branches/fix-links/libs/iostreams/test/Jamfile.v2 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -22,6 +22,7 @@
             : # input files
             : # build requirements
                 <toolset>msvc,<stdlib>stlport:<runtime-link>static
+ <toolset>msvc:<cxxflags>"-wd4996"
                 <toolset>cw-9.3,<os>darwin:<runtime-link>static
                 <define>BOOST_IOSTREAMS_NO_LIB
                 <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
@@ -70,7 +71,6 @@
           [ test-iostreams null_test.cpp ]
           [ test-iostreams operation_sequence_test.cpp ]
           [ test-iostreams pipeline_test.cpp ]
- [ test-iostreams positioning_test.cpp ]
           [ test-iostreams
                 regex_filter_test.cpp
                 /boost/regex//boost_regex ]
@@ -79,6 +79,9 @@
           [ test-iostreams seekable_filter_test.cpp ]
           [ test-iostreams sequence_test.cpp ]
           [ test-iostreams stdio_filter_test.cpp ]
+ [ test-iostreams stream_offset_32bit_test.cpp ]
+ [ test-iostreams stream_offset_64bit_test.cpp ]
+ [ test-iostreams stream_state_test.cpp ]
           [ test-iostreams symmetric_filter_test.cpp ]
           [ test-iostreams tee_test.cpp ]
           [ test-iostreams wide_stream_test.cpp ]

Modified: branches/fix-links/libs/iostreams/test/close_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/close_test.cpp (original)
+++ branches/fix-links/libs/iostreams/test/close_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -24,8 +24,8 @@
 #include <boost/iostreams/tee.hpp>
 #include <boost/test/test_tools.hpp>
 #include <boost/test/unit_test.hpp>
-#include "./detail/closable.hpp"
-#include "./detail/operation_sequence.hpp"
+#include "detail/closable.hpp"
+#include "detail/operation_sequence.hpp"
 
 using namespace std;
 using namespace boost;
@@ -1062,23 +1062,6 @@
         BOOST_CHECK_OPERATION_SEQUENCE(seq);
     }
 
- // Restrict a bidirectional device
- {
- operation_sequence seq;
- chain<bidirectional> ch;
- ch.push(
- io::restrict(
- closable_device<bidirectional>(
- seq.new_operation(1),
- seq.new_operation(2)
- ),
- 0
- )
- );
- BOOST_CHECK_NO_THROW(ch.reset());
- BOOST_CHECK_OPERATION_SEQUENCE(seq);
- }
-
     // Restrict a seekable device
     {
         operation_sequence seq;
@@ -1101,23 +1084,6 @@
         BOOST_CHECK_OPERATION_SEQUENCE(seq);
     }
 
- // Restrict a direct bidirectional device
- {
- operation_sequence seq;
- chain<bidirectional> ch;
- ch.push(
- io::restrict(
- closable_device<direct_bidirectional>(
- seq.new_operation(1),
- seq.new_operation(2)
- ),
- 0
- )
- );
- BOOST_CHECK_NO_THROW(ch.reset());
- BOOST_CHECK_OPERATION_SEQUENCE(seq);
- }
-
     // Restrict a direct seekable device
     {
         operation_sequence seq;
@@ -1142,29 +1108,6 @@
         BOOST_CHECK_OPERATION_SEQUENCE(seq);
     }
 
- // Restrict a bidirectional filter
- {
- operation_sequence seq;
- chain<bidirectional> ch;
- ch.push(
- io::restrict(
- closable_filter<bidirectional>(
- seq.new_operation(2),
- seq.new_operation(3)
- ),
- 0
- )
- );
- ch.push(
- closable_device<bidirectional>(
- seq.new_operation(1),
- seq.new_operation(4)
- )
- );
- BOOST_CHECK_NO_THROW(ch.reset());
- BOOST_CHECK_OPERATION_SEQUENCE(seq);
- }
-
     // Restrict a seekable filter
     {
         operation_sequence seq;

Modified: branches/fix-links/libs/iostreams/test/code_converter_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/code_converter_test.cpp (original)
+++ branches/fix-links/libs/iostreams/test/code_converter_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -22,7 +22,7 @@
 #if !defined(__COMO__) || !defined(BOOST_COMO_STRICT)
 # if defined(BOOST_IOSTREAMS_NO_LIB) || defined(BOOST_ALL_NO_LIB)
 # include "../src/file_descriptor.cpp"
-# else
+# else
 # include <boost/iostreams/device/file_descriptor.hpp>
 # endif
 #endif
@@ -38,75 +38,75 @@
 #include "detail/null_padded_codecvt.hpp"
 #include "detail/utf8_codecvt_facet.hpp"
 #ifdef BOOST_IOSTREAMS_USE_DINKUM_COREX
-# include <codecvt/8859_1>
-# include <codecvt/8859_10>
-# include <codecvt/8859_13>
-# include <codecvt/8859_14>
-# include <codecvt/8859_15>
-# include <codecvt/8859_16>
-# include <codecvt/8859_2>
-# include <codecvt/8859_3>
-# include <codecvt/8859_4>
-# include <codecvt/8859_5>
-# include <codecvt/8859_6>
-# include <codecvt/8859_7>
-# include <codecvt/8859_8>
-# include <codecvt/8859_9>
-# include <codecvt/baltic>
-# include <codecvt/big5>
-# include <codecvt/cp037>
-# include <codecvt/cp1006>
-# include <codecvt/cp1026>
-# include <codecvt/cp1250>
-# include <codecvt/cp1251>
-# include <codecvt/cp1252>
-# include <codecvt/cp1253>
-# include <codecvt/cp1254>
-# include <codecvt/cp1255>
-# include <codecvt/cp1256>
-# include <codecvt/cp1257>
-# include <codecvt/cp1258>
-# include <codecvt/cp424>
-# include <codecvt/cp437>
-# include <codecvt/cp500>
-# include <codecvt/cp737>
-# include <codecvt/cp775>
-# include <codecvt/cp850>
-# include <codecvt/cp852>
-# include <codecvt/cp855>
-# include <codecvt/cp856>
-# include <codecvt/cp857>
-# include <codecvt/cp860>
-# include <codecvt/cp861>
-# include <codecvt/cp862>
-# include <codecvt/cp863>
-# include <codecvt/cp864>
-# include <codecvt/cp865>
-# include <codecvt/cp866>
-# include <codecvt/cp869>
-# include <codecvt/cp874>
-# include <codecvt/cp875>
-# include <codecvt/cp932>
-# include <codecvt/cp936>
-# include <codecvt/cp949>
-# include <codecvt/cp950>
-# include <codecvt/cyrillic>
-# include <codecvt/ebcdic>
-# include <codecvt/euc>
-# include <codecvt/euc_0208>
-# include <codecvt/gb12345>
-# include <codecvt/gb2312>
-# include <codecvt/greek>
-# include <codecvt/iceland>
-# include <codecvt/jis>
-# include <codecvt/jis_0208>
-# include <codecvt/jis0201>
-# include <codecvt/ksc5601>
-# include <codecvt/latin2>
-# include <codecvt/one_one>
-# include <codecvt/roman>
-# include <codecvt/sjis>
-# include <codecvt/sjis_0208>
+# include <codecvt/8859_1>
+# include <codecvt/8859_10>
+# include <codecvt/8859_13>
+# include <codecvt/8859_14>
+# include <codecvt/8859_15>
+# include <codecvt/8859_16>
+# include <codecvt/8859_2>
+# include <codecvt/8859_3>
+# include <codecvt/8859_4>
+# include <codecvt/8859_5>
+# include <codecvt/8859_6>
+# include <codecvt/8859_7>
+# include <codecvt/8859_8>
+# include <codecvt/8859_9>
+# include <codecvt/baltic>
+# include <codecvt/big5>
+# include <codecvt/cp037>
+# include <codecvt/cp1006>
+# include <codecvt/cp1026>
+# include <codecvt/cp1250>
+# include <codecvt/cp1251>
+# include <codecvt/cp1252>
+# include <codecvt/cp1253>
+# include <codecvt/cp1254>
+# include <codecvt/cp1255>
+# include <codecvt/cp1256>
+# include <codecvt/cp1257>
+# include <codecvt/cp1258>
+# include <codecvt/cp424>
+# include <codecvt/cp437>
+# include <codecvt/cp500>
+# include <codecvt/cp737>
+# include <codecvt/cp775>
+# include <codecvt/cp850>
+# include <codecvt/cp852>
+# include <codecvt/cp855>
+# include <codecvt/cp856>
+# include <codecvt/cp857>
+# include <codecvt/cp860>
+# include <codecvt/cp861>
+# include <codecvt/cp862>
+# include <codecvt/cp863>
+# include <codecvt/cp864>
+# include <codecvt/cp865>
+# include <codecvt/cp866>
+# include <codecvt/cp869>
+# include <codecvt/cp874>
+# include <codecvt/cp875>
+# include <codecvt/cp932>
+# include <codecvt/cp936>
+# include <codecvt/cp949>
+# include <codecvt/cp950>
+# include <codecvt/cyrillic>
+# include <codecvt/ebcdic>
+# include <codecvt/euc>
+# include <codecvt/euc_0208>
+# include <codecvt/gb12345>
+# include <codecvt/gb2312>
+# include <codecvt/greek>
+# include <codecvt/iceland>
+# include <codecvt/jis>
+# include <codecvt/jis_0208>
+# include <codecvt/jis0201>
+# include <codecvt/ksc5601>
+# include <codecvt/latin2>
+# include <codecvt/one_one>
+# include <codecvt/roman>
+# include <codecvt/sjis>
+# include <codecvt/sjis_0208>
 # include <codecvt/turkish>
 # include <codecvt/utf16>
 # include <codecvt/utf8>
@@ -120,7 +120,7 @@
 using namespace boost::iostreams;
 using namespace boost::iostreams::detail;
 using namespace boost::iostreams::test;
-using boost::unit_test::test_suite;
+using boost::unit_test::test_suite;
 namespace io = boost::iostreams;
 
 const int max_length = 30;
@@ -146,9 +146,9 @@
 
 template<typename Codecvt>
 basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
     codecvt_intern<Codecvt>::type
->
+>
 test_string()
 {
     typedef typename codecvt_intern<Codecvt>::type intern_type;
@@ -157,7 +157,7 @@
         if (valid_char<Codecvt>(c))
             pattern += c;
     result.reserve(pattern.size() * pattern_reps);
- for (int w = 0; w < pattern_reps; ++w)
+ for (unsigned int w = 0; w < pattern_reps; ++w)
         result += pattern;
     return result;
 }
@@ -169,7 +169,7 @@
     typedef io::file_descriptor_sink classic_file_sink;
 #else
     struct classic_file_source : io::source {
- classic_file_source(const std::string& path)
+ classic_file_source(const std::string& path)
             : file_(new filebuf)
         {
             file_->pubimbue(locale::classic());
@@ -180,7 +180,7 @@
     };
 
     struct classic_file_sink : io::sink {
- classic_file_sink(const std::string& path)
+ classic_file_sink(const std::string& path)
             : file_(new filebuf)
         {
             file_->pubimbue(locale::classic());
@@ -195,7 +195,7 @@
 bool codecvt_test1()
 {
     typedef basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
                 codecvt_intern<Codecvt>::type
> string_type;
     typedef code_converter<classic_file_source, Codecvt> wide_file_source;
@@ -219,7 +219,7 @@
 bool codecvt_test2()
 {
     typedef basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
                 codecvt_intern<Codecvt>::type
> string_type;
     typedef code_converter<classic_file_source> wide_file_source;
@@ -244,8 +244,8 @@
 
 template<typename Codecvt>
 bool codecvt_test()
-{
- return codecvt_test1<Codecvt>() && codecvt_test2<Codecvt>();
+{
+ return codecvt_test1<Codecvt>() && codecvt_test2<Codecvt>();
 }
 
 void code_converter_test()
@@ -255,75 +255,75 @@
     BOOST_CHECK(codecvt_test<stateless_null_padded_codecvt>());
 #ifdef BOOST_IOSTREAMS_USE_DINKUM_COREX
     using namespace Dinkum::conversions;
- BOOST_CHECK(codecvt_test< codecvt_8859_1<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_10<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_13<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_14<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_15<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_16<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_2<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_3<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_4<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_5<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_6<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_7<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_8<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_9<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_baltic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_big5<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp037<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1006<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1026<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1250<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1251<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1252<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1253<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1254<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1255<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1256<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1257<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1258<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp424<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp437<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp500<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp737<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp775<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp850<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp852<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp855<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp856<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp857<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp860<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp861<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp862<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp863<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp864<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp865<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp866<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp869<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp874<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp875<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp932<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp936<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp949<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp950<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cyrillic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_ebcdic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_euc<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_euc_0208<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_gb12345<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_gb2312<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_greek<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_iceland<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis_0208<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis0201<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_ksc5601<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_latin2<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_one_one<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_roman<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_sjis<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_sjis_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_1<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_10<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_13<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_14<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_15<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_16<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_2<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_3<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_4<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_5<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_6<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_7<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_8<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_9<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_baltic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_big5<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp037<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1006<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1026<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1250<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1251<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1252<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1253<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1254<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1255<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1256<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1257<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1258<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp424<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp437<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp500<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp737<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp775<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp850<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp852<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp855<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp856<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp857<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp860<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp861<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp862<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp863<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp864<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp865<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp866<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp869<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp874<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp875<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp932<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp936<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp949<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp950<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cyrillic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_ebcdic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_euc<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_euc_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_gb12345<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_gb2312<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_greek<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_iceland<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis0201<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_ksc5601<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_latin2<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_one_one<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_roman<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_sjis<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_sjis_0208<wchar_t> >());
     BOOST_CHECK(codecvt_test< codecvt_turkish<wchar_t> >());
     BOOST_CHECK(codecvt_test< codecvt_utf16<wchar_t> >());
     BOOST_CHECK(codecvt_test< codecvt_utf8<wchar_t> >());
@@ -377,10 +377,10 @@
     }
 }*/
 
-test_suite* init_unit_test_suite(int, char* [])
+test_suite* init_unit_test_suite(int, char* [])
 {
     test_suite* test = BOOST_TEST_SUITE("code_converter test");
     test->add(BOOST_TEST_CASE(&code_converter_test));
     //test->add(BOOST_TEST_CASE(&close_test));
     return test;
-}
\ No newline at end of file
+}

Modified: branches/fix-links/libs/iostreams/test/copy_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/copy_test.cpp (original)
+++ branches/fix-links/libs/iostreams/test/copy_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -4,68 +4,147 @@
 
 // See http://www.boost.org/libs/iostreams for documentation.
 
-#include <fstream>
+#include <algorithm> // Equal
+#include <vector>
 #include <boost/config.hpp> // MSVC.
 #include <boost/detail/workaround.hpp>
+#include <boost/iostreams/concepts.hpp> // sink
 #include <boost/iostreams/copy.hpp>
+#include <boost/iostreams/device/array.hpp>
 #include <boost/iostreams/device/file.hpp>
+#include <boost/iostreams/stream.hpp>
 #include <boost/test/test_tools.hpp>
 #include <boost/test/unit_test.hpp>
-#include "detail/temp_file.hpp"
-#include "detail/verification.hpp"
+#include "../example/container_device.hpp"
+#include "detail/sequence.hpp"
 
 using namespace std;
 using namespace boost;
 using namespace boost::iostreams;
+using namespace boost::iostreams::example;
 using namespace boost::iostreams::test;
 using boost::unit_test::test_suite;
+
+//------------------Definition of fixed_sink----------------------------------//
+
+/*class fixed_sink : public sink {
+public:
+ fixed_sink(vector<char>& storage)
+ : storage_(storage), pos_(0)
+ { }
+ std::streamsize write(const char_type* s, std::streamsize n)
+ {
+ streamsize capacity = static_cast<streamsize>(storage_.size() - pos_);
+ streamsize result = (min)(n, capacity);
+ std::copy(s, s + result, storage_.begin() + pos_);
+ pos_ += result;
+ return result;
+ }
+private:
+ fixed_sink operator=(const fixed_sink&);
+ typedef vector<char>::size_type size_type;
+ vector<char>& storage_;
+ size_type pos_;
+};*/
+
+//------------------Definition of stream types--------------------------------//
+
+typedef container_source< vector<char> > vector_source;
+typedef container_sink< vector<char> > vector_sink;
+typedef stream<vector_source> vector_istream;
+typedef stream<vector_sink> vector_ostream;
+//typedef stream<fixed_sink> fixed_ostream;
+
+//------------------Definition of copy_test-----------------------------------//
 
 void copy_test()
 {
- test_file test;
-
+ // Stream to stream
     {
- temp_file dest;
- ifstream first(test.name().c_str(), in_mode);
- ofstream second(dest.name().c_str(), out_mode);
- boost::iostreams::copy(first, second);
- first.close();
- second.close();
+ test_sequence<> src;
+ vector<char> dest;
+ vector_istream first;
+ vector_ostream second;
+ first.open(vector_source(src));
+ second.open(vector_sink(dest));
         BOOST_CHECK_MESSAGE(
- compare_files(test.name(), dest.name()),
+ boost::iostreams::copy(first, second) == src.size() && src == dest,
             "failed copying from stream to stream"
         );
     }
 
+ // Stream to indirect sink
+ {
+ test_sequence<> src;
+ vector<char> dest;
+ vector_istream in;
+ vector_sink out(dest);
+ in.open(vector_source(src));
+ BOOST_CHECK_MESSAGE(
+ boost::iostreams::copy(in, out) == src.size() && src == dest,
+ "failed copying from stream to indirect sink"
+ );
+ }
+
+ // Indirect source to stream
+ {
+ test_sequence<> src;
+ vector<char> dest;
+ vector_source in(src);
+ vector_ostream out;
+ out.open(vector_sink(dest));
+ BOOST_CHECK_MESSAGE(
+ boost::iostreams::copy(in, out) == src.size() && src == dest,
+ "failed copying from indirect source to stream"
+ );
+ }
+
+ // Indirect source to indirect sink
+ {
+ test_sequence<> src;
+ vector<char> dest;
+ vector_source in(src);
+ vector_sink out(dest);
+ BOOST_CHECK_MESSAGE(
+ boost::iostreams::copy(in, out) == src.size() && src == dest,
+ "failed copying from indirect source to indirect sink"
+ );
+ }
+
+ // Direct source to direct sink
     {
- temp_file dest;
- ifstream first(test.name().c_str(), in_mode);
- boost::iostreams::copy(first, file_sink(dest.name(), out_mode));
- first.close();
+ test_sequence<> src;
+ vector<char> dest(src.size(), '?');
+ array_source in(&src[0], &src[0] + src.size());
+ array_sink out(&dest[0], &dest[0] + dest.size());
         BOOST_CHECK_MESSAGE(
- compare_files(test.name(), dest.name()),
- "failed copying from stream to file_sink"
+ boost::iostreams::copy(in, out) == src.size() && src == dest,
+ "failed copying from direct source to direct sink"
         );
     }
 
+ // Direct source to indirect sink
     {
- temp_file dest;
- ofstream second(dest.name().c_str(), out_mode);
- boost::iostreams::copy(file_source(test.name(), in_mode), second);
- second.close();
+ test_sequence<> src;
+ vector<char> dest;
+ array_source in(&src[0], &src[0] + src.size());
+ vector_ostream out(dest);
         BOOST_CHECK_MESSAGE(
- compare_files(test.name(), dest.name()),
- "failed copying from file_source to stream"
+ boost::iostreams::copy(in, out) == src.size() && src == dest,
+ "failed copying from direct source to indirect sink"
         );
     }
 
+ // Indirect source to direct sink
     {
- temp_file dest;
- boost::iostreams::copy( file_source(test.name(), in_mode),
- file_sink(dest.name(), out_mode) );
+ test_sequence<> src;
+ vector<char> dest(src.size(), '?');
+ vector_istream in;
+ array_sink out(&dest[0], &dest[0] + dest.size());
+ in.open(vector_source(src));
         BOOST_CHECK_MESSAGE(
- compare_files(test.name(), dest.name()),
- "failed copying from file_source to file_sink"
+ boost::iostreams::copy(in, out) == src.size() && src == dest,
+ "failed copying from indirect source to direct sink"
         );
     }
 }

Modified: branches/fix-links/libs/iostreams/test/detail/closable.hpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/detail/closable.hpp (original)
+++ branches/fix-links/libs/iostreams/test/detail/closable.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -45,7 +45,7 @@
 class closable_device<output> : public sink {
 public:
     closable_device(operation close) : close_(close) { }
- std::streamsize write(const char*, std::streamsize n) { return 0; }
+ std::streamsize write(const char*, std::streamsize) { return 0; }
     void close() { close_.execute(); }
 private:
     operation close_;
@@ -58,7 +58,7 @@
 class closable_device<borland_output> : public sink {
 public:
     closable_device(operation close) : close_(close) { }
- std::streamsize write(const char*, std::streamsize n) { return 0; }
+ std::streamsize write(const char*, std::streamsize) { return 0; }
     void close() { close_.execute(); }
 private:
     operation close_;
@@ -72,7 +72,7 @@
         : close_input_(close_input), close_output_(close_output)
         { }
     std::streamsize read(char*, std::streamsize) { return -1; }
- std::streamsize write(const char*, std::streamsize n) { return 0; }
+ std::streamsize write(const char*, std::streamsize) { return 0; }
     void close(BOOST_IOS::openmode which)
     {
         switch (which) {
@@ -97,7 +97,7 @@
 public:
     closable_device(operation close) : close_(close) { }
     std::streamsize read(char*, std::streamsize) { return -1; }
- std::streamsize write(const char*, std::streamsize n) { return 0; }
+ std::streamsize write(const char*, std::streamsize) { return 0; }
     stream_offset seek(stream_offset, BOOST_IOS::seekdir) { return 0; }
     void close() { close_.execute(); }
 private:

Modified: branches/fix-links/libs/iostreams/test/detail/filters.hpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/detail/filters.hpp (original)
+++ branches/fix-links/libs/iostreams/test/detail/filters.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -134,7 +134,7 @@
           flushable_tag
         { };
     template<typename Sink>
- bool put(Sink& s, char c)
+ bool put(Sink&, char c)
     {
         buf_.push_back(c);
         return true;

Modified: branches/fix-links/libs/iostreams/test/detail/null_padded_codecvt.hpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/detail/null_padded_codecvt.hpp (original)
+++ branches/fix-links/libs/iostreams/test/detail/null_padded_codecvt.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -132,7 +132,10 @@
     }
 
     std::codecvt_base::result
- do_unshift(state_type& state, char* first2, char* last2, char*& next2) const
+ do_unshift( state_type& state,
+ char* /* first2 */,
+ char* last2,
+ char*& next2 ) const
     {
         using namespace std;
         next2 = last2;
@@ -231,7 +234,10 @@
     }
 
     std::codecvt_base::result
- do_unshift(state_type&, char* first2, char* last2, char*& next2) const
+ do_unshift( state_type&,
+ char* /* first2 */,
+ char* /* last2 */,
+ char*& /* next2 */ ) const
     {
         return std::codecvt_base::ok;
     }

Modified: branches/fix-links/libs/iostreams/test/detail/operation_sequence.hpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/detail/operation_sequence.hpp (original)
+++ branches/fix-links/libs/iostreams/test/detail/operation_sequence.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -62,6 +62,7 @@
             : seq(seq), id(id), error_code(error_code)
             { }
         ~impl() { remove_operation(seq, id); }
+ impl& operator=(const impl&); // Supress VC warning 4512
         operation_sequence& seq;
         int id;
         int error_code;

Modified: branches/fix-links/libs/iostreams/test/detail/utf8_codecvt_facet.hpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/detail/utf8_codecvt_facet.hpp (original)
+++ branches/fix-links/libs/iostreams/test/detail/utf8_codecvt_facet.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -110,7 +110,7 @@
     virtual std::codecvt_base::result do_unshift(
         std::mbstate_t&,
         char * from,
- char * to,
+ char * /* to */,
         char * & next
     ) const{
         next = from;

Modified: branches/fix-links/libs/iostreams/test/detail/verification.hpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/detail/verification.hpp (original)
+++ branches/fix-links/libs/iostreams/test/detail/verification.hpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -8,6 +8,7 @@
 #ifndef BOOST_IOSTREAMS_TEST_VERIFICATION_HPP_INCLUDED
 #define BOOST_IOSTREAMS_TEST_VERIFICATION_HPP_INCLUDED
 
+#include <iostream>
 #include <exception>
 #include <string>
 #include <string.h>
@@ -137,7 +138,7 @@
     // Test seeking with ios::beg
     std::streamoff off = 0;
     io.seekp(0, BOOST_IOS::beg);
- for (i = 0; i < data_reps; ++i, off+= chunk_size) {
+ for (i = 0; i < data_reps; ++i, off += chunk_size) {
         int j;
         for (j = 0; j < chunk_size; ++j)
             io.put(narrow_data()[j]);
@@ -173,7 +174,7 @@
 {
     int i; // old 'for' scope workaround.
 
- // Test seeking with ios::cu
+ // Test seeking with ios::cur
     for (i = 0; i < data_reps; ++i) {
         io.write(narrow_data(), chunk_size);
         io.seekp(-chunk_size, BOOST_IOS::cur);
@@ -188,7 +189,7 @@
     // Test seeking with ios::beg
     std::streamoff off = 0;
     io.seekp(0, BOOST_IOS::beg);
- for (i = 0; i < data_reps; ++i) {
+ for (i = 0; i < data_reps; ++i, off += chunk_size) {
         io.write(narrow_data(), chunk_size);
         io.seekp(off, BOOST_IOS::beg);
         char buf[chunk_size];
@@ -203,7 +204,7 @@
     io.seekp(0, BOOST_IOS::end);
     off = io.tellp();
     io.seekp(-off, BOOST_IOS::end);
- for (i = 0; i < data_reps; ++i) {
+ for (i = 0; i < data_reps; ++i, off -= chunk_size) {
         io.write(narrow_data(), chunk_size);
         io.seekp(-off, BOOST_IOS::end);
         char buf[chunk_size];
@@ -216,6 +217,88 @@
     return true;
 }
 
+bool test_input_seekable(std::istream& io)
+{
+ int i; // old 'for' scope workaround.
+
+ // Test seeking with ios::cur
+ for (i = 0; i < data_reps; ++i) {
+ for (int j = 0; j < chunk_size; ++j)
+ if (io.get() != narrow_data()[j])
+ return false;
+ io.seekg(-chunk_size, BOOST_IOS::cur);
+ char buf[chunk_size];
+ io.read(buf, chunk_size);
+ if (strncmp(buf, narrow_data(), chunk_size) != 0)
+ return false;
+ }
+
+ // Test seeking with ios::beg
+ std::streamoff off = 0;
+ io.seekg(0, BOOST_IOS::beg);
+ for (i = 0; i < data_reps; ++i, off += chunk_size) {
+ for (int j = 0; j < chunk_size; ++j)
+ if (io.get() != narrow_data()[j])
+ return false;
+ io.seekg(off, BOOST_IOS::beg);
+ char buf[chunk_size];
+ io.read(buf, chunk_size);
+ if (strncmp(buf, narrow_data(), chunk_size) != 0)
+ return false;
+ }
+
+ // Test seeking with ios::end
+ io.seekg(0, BOOST_IOS::end);
+ off = io.tellg();
+ io.seekg(-off, BOOST_IOS::end);
+ for (i = 0; i < data_reps; ++i, off -= chunk_size) {
+ for (int j = 0; j < chunk_size; ++j)
+ if (io.get() != narrow_data()[j])
+ return false;
+ io.seekg(-off, BOOST_IOS::end);
+ char buf[chunk_size];
+ io.read(buf, chunk_size);
+ if (strncmp(buf, narrow_data(), chunk_size) != 0)
+ return false;
+ }
+ return true;
+}
+
+bool test_output_seekable(std::ostream& io)
+{
+ int i; // old 'for' scope workaround.
+
+ // Test seeking with ios::cur
+ for (i = 0; i < data_reps; ++i) {
+ for (int j = 0; j < chunk_size; ++j)
+ io.put(narrow_data()[j]);
+ io.seekp(-chunk_size, BOOST_IOS::cur);
+ io.write(narrow_data(), chunk_size);
+ }
+
+ // Test seeking with ios::beg
+ std::streamoff off = 0;
+ io.seekp(0, BOOST_IOS::beg);
+ for (i = 0; i < data_reps; ++i, off += chunk_size) {
+ for (int j = 0; j < chunk_size; ++j)
+ io.put(narrow_data()[j]);
+ io.seekp(off, BOOST_IOS::beg);
+ io.write(narrow_data(), chunk_size);
+ }
+
+ // Test seeking with ios::end
+ io.seekp(0, BOOST_IOS::end);
+ off = io.tellp();
+ io.seekp(-off, BOOST_IOS::end);
+ for (i = 0; i < data_reps; ++i, off -= chunk_size) {
+ for (int j = 0; j < chunk_size; ++j)
+ io.put(narrow_data()[j]);
+ io.seekp(-off, BOOST_IOS::end);
+ io.write(narrow_data(), chunk_size);
+ }
+ return true;
+}
+
 } } } // End namespaces test, iostreams, boost.
 
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)

Modified: branches/fix-links/libs/iostreams/test/execute_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/execute_test.cpp (original)
+++ branches/fix-links/libs/iostreams/test/execute_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -26,25 +26,33 @@
 // Function object that sets a boolean flag and returns a value
 // specified at construction
 template<typename Result>
-struct operation {
+class operation {
+public:
     typedef Result result_type;
- operation(Result r, bool& executed) : r(r), executed(executed) { }
+ explicit operation(Result r, bool& executed)
+ : r_(r), executed_(executed)
+ { }
     Result operator()() const
     {
- executed = true;
- return r;
+ executed_ = true;
+ return r_;
     }
- Result r;
- bool& executed;
+private:
+ operation& operator=(const operation&);
+ Result r_;
+ bool& executed_;
 };
 
 // Specialization for void return
 template<>
-struct operation<void> {
+class operation<void> {
+public:
     typedef void result_type;
- operation(bool& executed) : executed(executed) { }
- void operator()() const { executed = true; }
- bool& executed;
+ explicit operation(bool& executed) : executed_(executed) { }
+ void operator()() const { executed_ = true; }
+private:
+ operation& operator=(const operation&);
+ bool& executed_;
 };
 
 // Simple exception class with error code built in to type
@@ -53,24 +61,28 @@
 
 // Function object that sets a boolean flag and throws an exception
 template<int Code>
-struct thrower {
+class thrower {
+public:
     typedef void result_type;
- thrower(bool& executed) : executed(executed) { }
+ explicit thrower(bool& executed) : executed_(executed) { }
     void operator()() const
     {
- executed = true;
+ executed_ = true;
         throw error<Code>();
     }
- bool& executed;
+private:
+ thrower& operator=(const thrower&);
+ bool& executed_;
 };
 
 // Function object for use by foreach_test
-struct foreach_func {
+class foreach_func {
+public:
     typedef void result_type;
- foreach_func(int& count) : count(count) { }
+ explicit foreach_func(int& count) : count_(count) { }
     void operator()(int x) const
     {
- ++count;
+ ++count_;
         switch (x) {
         case 0: throw error<0>();
         case 1: throw error<1>();
@@ -86,7 +98,9 @@
             break;
         }
     }
- int& count; // Number of times operator() has been called
+private:
+ foreach_func& operator=(const foreach_func&);
+ int& count_; // Number of times operator() has been called
 };
 
 void success_test()

Modified: branches/fix-links/libs/iostreams/test/file_descriptor_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/file_descriptor_test.cpp (original)
+++ branches/fix-links/libs/iostreams/test/file_descriptor_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -142,6 +142,30 @@
         BOOST_CHECK(!file.is_open());
     }
 
+ //--Test seeking with file_descriptor_source and file_descriptor_sink-----//
+
+ {
+ file_descriptor_sink sink(test1.name());
+ fdostream out(sink);
+ BOOST_CHECK(out->is_open());
+ BOOST_CHECK_MESSAGE(
+ test_output_seekable(out),
+ "failed seeking within a file_descriptor_sink"
+ );
+ out->close();
+ BOOST_CHECK(!out->is_open());
+
+ file_descriptor_source source(test1.name());
+ fdistream in(source);
+ BOOST_CHECK(in->is_open());
+ BOOST_CHECK_MESSAGE(
+ test_input_seekable(in),
+ "failed seeking within a file_descriptor_source"
+ );
+ in->close();
+ BOOST_CHECK(!in->is_open());
+ }
+
     //--------------Test file_descriptor--------------------------------------//
 
     {

Deleted: branches/fix-links/libs/iostreams/test/offset_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/offset_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
+++ (empty file)
@@ -1,333 +0,0 @@
-// (C) Copyright Jonathan Turkanis 2004
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Todo: add tests for direct devices.
-
-#include <algorithm> // equal.
-#include <cctype>
-#include <iterator> // back_inserter.
-#include <vector>
-#include <boost/iostreams/copy.hpp>
-#include <boost/iostreams/device/file.hpp>
-#include <boost/iostreams/device/null.hpp>
-#include <boost/iostreams/filtering_stream.hpp>
-#include <boost/iostreams/offset.hpp>
-#include <boost/test/test_tools.hpp>
-#include <boost/test/unit_test.hpp>
-#include "detail/constants.hpp"
-#include "detail/filters.hpp"
-#include "detail/sequence.hpp"
-#include "detail/temp_file.hpp"
-#include "detail/verification.hpp"
-
-using namespace std;
-using namespace boost;
-using namespace boost::iostreams;
-using namespace boost::iostreams::test;
-using boost::unit_test::test_suite;
-
-const char pad_char = '\n';
-const small_padding = 50;
-const large_padding = default_device_buffer_size + 50;
-
-void write_padding(std::ofstream& out, int len)
-{
- for (int z = 0; z < len; ++z)
- out.put(pad_char);
-}
-
-struct offset_test_file : public temp_file {
- offset_test_file(int padding)
- {
- BOOST_IOS::openmode mode =
- BOOST_IOS::out | BOOST_IOS::binary;
- ::std::ofstream f(name().c_str(), mode);
- write_padding(f, padding);
- const char* buf = narrow_data();
- for (int z = 0; z < data_reps; ++z)
- f.write(buf, data_length());
- write_padding(f, padding);
- }
-};
-
-struct offset_test_sequence : public std::vector<char> {
- offset_test_sequence(int padding)
- {
- for (int z = 0; z < padding; ++z)
- push_back(pad_char);
- const char* buf = narrow_data();
- for (int z = 0; z < data_reps; ++z)
- insert(end(), buf, buf + data_length());
- for (int z = 0; z < padding; ++z)
- push_back(pad_char);
- }
-};
-
-struct offset_uppercase_file : public temp_file {
- offset_uppercase_file(int padding)
- {
- BOOST_IOS::openmode mode =
- BOOST_IOS::out | BOOST_IOS::binary;
- ::std::ofstream f(name().c_str(), mode);
- write_padding(f, padding);
- const char* buf = narrow_data();
- for (int z = 0; z < data_reps; ++z)
- for (int w = 0; w < data_length(); ++w)
- f.put((char) std::toupper(buf[w]));
- write_padding(f, padding);
- }
-};
-
-struct offset_lowercase_file : public temp_file {
- offset_lowercase_file(int padding)
- {
- BOOST_IOS::openmode mode =
- BOOST_IOS::out | BOOST_IOS::binary;
- ::std::ofstream f(name().c_str(), mode);
- write_padding(f, padding);
- const char* buf = narrow_data();
- for (int z = 0; z < data_reps; ++z)
- for (int w = 0; w < data_length(); ++w)
- f.put((char) std::tolower(buf[w]));
- write_padding(f, padding);
- }
-};
-
-// Can't have an offset view of a non-seekble output filter.
-struct tolower_seekable_filter : public seekable_filter {
- typedef char char_type;
- struct category
- : output_seekable,
- filter_tag
- { };
- template<typename Sink>
- bool put(Sink& s, char c)
- { return boost::iostreams::put(s, (char) std::tolower(c)); }
-
- template<typename Sink>
- std::streampos seek(Sink& s, stream_offset off, BOOST_IOS::seekdir way)
- { return boost::iostreams::seek(s, off, way); }
-};
-
-void read_device()
-{
- {
- offset_test_file src1(small_padding);
- test_file src2;
- stream_offset off = small_padding,
- len = data_reps * data_length();
- filtering_istream first(offset(file_source(src1.name(), in_mode), off, len));
- ifstream second(src2.name().c_str(), in_mode);
- BOOST_CHECK_MESSAGE(
- compare_streams_in_chunks(first, second),
- "failed reading from offset_view<Device> with small padding"
- );
- }
-
- {
- offset_test_file src1(large_padding);
- test_file src2;
- stream_offset off = large_padding,
- len = data_reps * data_length();
- filtering_istream first(offset(file_source(src1.name(), in_mode), off, len));
- ifstream second(src2.name().c_str(), in_mode);
- BOOST_CHECK_MESSAGE(
- compare_streams_in_chunks(first, second),
- "failed reading from offset_view<Device> with large padding"
- );
- }
-}
-
-void read_direct_device()
-{
-
- test_sequence<char> first;
- offset_test_sequence src(small_padding);
- array_source array_src(&src[0], &src[0] + src.size());
- stream_offset off = small_padding,
- len = data_reps * data_length();
- filtering_istream second(offset(array_src, off, len));
- BOOST_CHECK_MESSAGE(
- compare_container_and_stream(first, second),
- "failed reading from offset_view<DirectDevice>"
- );
-}
-
-void read_filter()
-{
- {
- offset_test_file src1(small_padding);
- uppercase_file src2;
- stream_offset off = small_padding,
- len = data_reps * data_length();
- filtering_istream first;
- first.push(offset(toupper_filter(), off, len));
- first.push(file_source(src1.name(), in_mode));
- ifstream second(src2.name().c_str(), in_mode);
- BOOST_CHECK_MESSAGE(
- compare_streams_in_chunks(first, second),
- "failed reading from an offset_view<Filter> with small padding"
- );
- }
-
- {
- offset_test_file src1(large_padding);
- uppercase_file src2;
- stream_offset off = large_padding,
- len = data_reps * data_length();
- filtering_istream first;
- first.push(offset(toupper_filter(), off, len));
- first.push(file_source(src1.name(), in_mode));
- ifstream second(src2.name().c_str(), in_mode);
- BOOST_CHECK_MESSAGE(
- compare_streams_in_chunks(first, second),
- "failed reading from offset_view<Filter> with large padding"
- );
- }
-}
-
-void write_device()
-{
- {
- offset_uppercase_file dest1(small_padding);
- offset_test_file dest2(small_padding);
- stream_offset off = small_padding,
- len = data_reps * data_length();
- filtering_ostream out(offset(file(dest1.name(), BOOST_IOS::binary), off, len));
- write_data_in_chunks(out);
- out.reset();
- ifstream first(dest1.name().c_str(), in_mode);
- ifstream second(dest2.name().c_str(), in_mode);
- BOOST_CHECK_MESSAGE(
- compare_streams_in_chunks(first, second),
- "failed writing to an offset_view<Device> with small padding"
- );
- }
-
- {
- offset_uppercase_file dest1(large_padding);
- offset_test_file dest2(large_padding);
- stream_offset off = large_padding,
- len = data_reps * data_length();
- filtering_ostream out(offset(file(dest1.name(), BOOST_IOS::binary), off, len));
- write_data_in_chunks(out);
- out.reset();
- ifstream first(dest1.name().c_str(), in_mode);
- ifstream second(dest2.name().c_str(), in_mode);
- BOOST_CHECK_MESSAGE(
- compare_streams_in_chunks(first, second),
- "failed writing to offset_view<Device> with large padding"
- );
- }
-}
-
-void write_direct_device()
-{
- vector<char> dest1(data_reps * data_length() + 2 * small_padding, '\n');
- offset_test_sequence dest2(small_padding);
- stream_offset off = small_padding,
- len = data_reps * data_length();
- array_sink array(&dest1[0], &dest1[0] + dest1.size());
- filtering_ostream out(offset(array, off, len));
- write_data_in_chunks(out);
- out.reset();
- BOOST_CHECK_MESSAGE(
- std::equal(dest1.begin(), dest1.end(), dest2.begin()),
- "failed writing to offset_view<DirectDevice>"
- );
-}
-
-void write_filter()
-{
- {
- offset_test_file dest1(small_padding);
- offset_lowercase_file dest2(small_padding);
- stream_offset off = small_padding,
- len = data_reps * data_length();
- filtering_ostream out;
- out.push(offset(tolower_seekable_filter(), off, len));
- out.push(file(dest1.name(), BOOST_IOS::binary));
- write_data_in_chunks(out);
- out.reset();
- ifstream first(dest1.name().c_str(), in_mode);
- ifstream second(dest2.name().c_str(), in_mode);
- BOOST_CHECK_MESSAGE(
- compare_streams_in_chunks(first, second),
- "failed writing to offset_view<Filter> with small padding"
- );
- }
-
- {
- offset_test_file dest1(large_padding);
- offset_lowercase_file dest2(large_padding);
- stream_offset off = large_padding,
- len = data_reps * data_length();
- filtering_ostream out;
- out.push(offset(tolower_seekable_filter(), off, len));
- out.push(file(dest1.name(), BOOST_IOS::binary));
- write_data_in_chunks(out);
- out.reset();
- ifstream first(dest1.name().c_str(), in_mode);
- ifstream second(dest2.name().c_str(), in_mode);
- BOOST_CHECK_MESSAGE(
- compare_streams_in_chunks(first, second),
- "failed writing to offset_view<Filter> with large padding"
- );
- }
-}
-
-void seek_device()
-{
- offset_test_file src(small_padding);
- stream_offset off = large_padding,
- len = data_reps * data_length();
- filtering_stream<seekable> io(offset(file(src.name(), BOOST_IOS::binary), off, len));
- BOOST_CHECK_MESSAGE(
- test_seekable_in_chars(io),
- "failed seeking within offset_view<Device>"
- );
-}
-
-void seek_direct_device()
-{
- vector<char> src(data_reps * data_length() + 2 * small_padding, '\n');
- stream_offset off = small_padding,
- len = data_reps * data_length();
- array ar(&src[0], &src[0] + src.size());
- filtering_stream<seekable> io(offset(ar, off, len));
- BOOST_CHECK_MESSAGE(
- test_seekable_in_chars(io),
- "failed seeking within offset_view<DirectDevice> with small padding"
- );
-}
-
-void seek_filter()
-{
- offset_test_file src(small_padding);
- stream_offset off = large_padding,
- len = data_reps * data_length();
- filtering_stream<seekable> io;
- io.push(offset(identity_seekable_filter(), off, len));
- io.push(file(src.name(), BOOST_IOS::binary));
- BOOST_CHECK_MESSAGE(
- test_seekable_in_chars(io),
- "failed seeking within offset_view<Device>"
- );
-}
-
-test_suite* init_unit_test_suite(int, char* [])
-{
- test_suite* test = BOOST_TEST_SUITE("offset test");
- test->add(BOOST_TEST_CASE(&read_device));
- test->add(BOOST_TEST_CASE(&read_direct_device));
- test->add(BOOST_TEST_CASE(&read_filter));
- test->add(BOOST_TEST_CASE(&write_device));
- test->add(BOOST_TEST_CASE(&write_direct_device));
- test->add(BOOST_TEST_CASE(&write_filter));
- test->add(BOOST_TEST_CASE(&seek_device));
- test->add(BOOST_TEST_CASE(&seek_direct_device));
- return test;
-}

Modified: branches/fix-links/libs/iostreams/test/operation_sequence_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/operation_sequence_test.cpp (original)
+++ branches/fix-links/libs/iostreams/test/operation_sequence_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -17,7 +17,7 @@
 #include <stdexcept>
 #include <boost/test/test_tools.hpp>
 #include <boost/test/unit_test.hpp>
-#include "./detail/operation_sequence.hpp"
+#include "detail/operation_sequence.hpp"
 
 using namespace std;
 using namespace boost;

Deleted: branches/fix-links/libs/iostreams/test/positioning_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/positioning_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
+++ (empty file)
@@ -1,68 +0,0 @@
-// (C) Copyright Jonathan Turkanis 2005
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/positioning.hpp>
-#include <boost/integer_traits.hpp>
-#include <boost/test/test_tools.hpp>
-#include <boost/test/unit_test.hpp>
-
-#include <iostream>
-
-using namespace std;
-using namespace boost;
-using namespace boost::iostreams;
-using boost::unit_test::test_suite;
-
-//void extrema_test_test()
-//{
-// stream_offset minoff = integer_traits<stream_offset>::const_min;
-// stream_offset maxoff = integer_traits<stream_offset>::const_max;
-//
-// BOOST_CHECK(minoff == position_to_offset(offset_to_position(minoff)));
-// BOOST_CHECK(0 == position_to_offset(offset_to_position(0)));
-// BOOST_CHECK(maxoff == position_to_offset(offset_to_position(maxoff)));
-//}
-
-void large_file_test()
-{
- stream_offset large_file = 100 * 1024 * 1024 * 1024; // 100GB.
- stream_offset first = -large_file - (-large_file) % 10000000;
- stream_offset last = large_file - large_file % 10000000;
-
- for (stream_offset off = first; off < last; off += 10000000)
- {
- BOOST_CHECK(off == position_to_offset(offset_to_position(off)));
- }
-}
-
-void small_file_test()
-{
- stream_offset small_file = 1000000;
- stream_offset off = -small_file;
- streampos pos = offset_to_position(off);
-
- while (off < small_file)
- {
- BOOST_CHECK(off == position_to_offset(offset_to_position(off)));
- BOOST_CHECK(pos == offset_to_position(position_to_offset(pos)));
- off += 20000;
- pos += 20000;
- BOOST_CHECK(off == position_to_offset(offset_to_position(off)));
- BOOST_CHECK(pos == offset_to_position(position_to_offset(pos)));
- off -= 10000;
- pos -= 10000;
- }
-}
-
-test_suite* init_unit_test_suite(int, char* [])
-{
- test_suite* test = BOOST_TEST_SUITE("positioning test");
- //test->add(BOOST_TEST_CASE(&extrema_test_test));
- test->add(BOOST_TEST_CASE(&large_file_test));
- test->add(BOOST_TEST_CASE(&small_file_test));
- return test;
-}

Modified: branches/fix-links/libs/iostreams/test/symmetric_filter_test.cpp
==============================================================================
--- branches/fix-links/libs/iostreams/test/symmetric_filter_test.cpp (original)
+++ branches/fix-links/libs/iostreams/test/symmetric_filter_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -29,7 +29,7 @@
                 std::streamsize buffer_size =
                     default_filter_buffer_size
              )
- : buf_(default_filter_buffer_size)
+ : buf_(buffer_size)
     {
         buf_.set(0, 0);
     }

Modified: branches/fix-links/libs/serialization/test/test_complex.cpp
==============================================================================
--- branches/fix-links/libs/serialization/test/test_complex.cpp (original)
+++ branches/fix-links/libs/serialization/test/test_complex.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -30,8 +30,12 @@
     BOOST_REQUIRE(NULL != testfile);
 
     // test array of objects
- std::complex<float> a(std::rand(),std::rand());
- std::complex<double> b(std::rand(),std::rand());
+ std::complex<float> a(static_cast<float>(std::rand()),
+ static_cast<float>(std::rand()));
+
+ std::complex<double> b(static_cast<double>(std::rand()),
+ static_cast<double>(std::rand()));
+
     {
         test_ostream os(testfile, TEST_STREAM_FLAGS);
         test_oarchive oa(os);

Modified: branches/fix-links/libs/utility/value_init_test.cpp
==============================================================================
--- branches/fix-links/libs/utility/value_init_test.cpp (original)
+++ branches/fix-links/libs/utility/value_init_test.cpp 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -202,6 +202,13 @@
   x_c_ref = z ;
   BOOST_CHECK ( x_c == z ) ;
 
+ boost::value_initialized<T> const copy1 = x;
+ BOOST_CHECK ( boost::get(copy1) == boost::get(x) ) ;
+
+ boost::value_initialized<T> copy2;
+ copy2 = x;
+ BOOST_CHECK ( boost::get(copy2) == boost::get(x) ) ;
+
   boost::shared_ptr<boost::value_initialized<T> > ptr( new boost::value_initialized<T> );
   BOOST_CHECK ( y == *ptr ) ;
 

Modified: branches/fix-links/tools/build/v2/build/alias.jam
==============================================================================
--- branches/fix-links/tools/build/v2/build/alias.jam (original)
+++ branches/fix-links/tools/build/v2/build/alias.jam 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -24,10 +24,7 @@
 
 import targets ;
 import "class" : new ;
-import property ;
 import errors : error ;
-import type : type ;
-import regex ;
 import project ;
 import property-set ;
 

Modified: branches/fix-links/tools/build/v2/doc/src/advanced.xml
==============================================================================
--- branches/fix-links/tools/build/v2/doc/src/advanced.xml (original)
+++ branches/fix-links/tools/build/v2/doc/src/advanced.xml 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -777,10 +777,10 @@
         such as defines. It can be also useful for ordinary properties. Consider
         this example:
 <programlisting>
-project test : requirements &lt;threading;&gt;multi ;
+project test : requirements &lt;threading&gt;multi ;
 exe test1 : test1.cpp ;
-exe test2 : test2.cpp : &lt;threading;&gt;single ;
-exe test3 : test3.cpp : -&lt;threading;&gt;multi ;
+exe test2 : test2.cpp : &lt;threading&gt;single ;
+exe test3 : test3.cpp : -&lt;threading&gt;multi ;
 </programlisting>
         Here, <code>test1</code> inherits project requirements and will always
         be built in multi-threaded mode. The <code>test2</code> target

Modified: branches/fix-links/tools/build/v2/doc/src/reference.xml
==============================================================================
--- branches/fix-links/tools/build/v2/doc/src/reference.xml (original)
+++ branches/fix-links/tools/build/v2/doc/src/reference.xml 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -329,7 +329,7 @@
         will print the names of all C++ files in your project. The
         <literal>.svn</literal> exclude pattern prevents the
         <code>glob-tree</code> rule from entering administrative
- directories of the Subverion version control system.
+ directories of the Subversion version control system.
         </para></listitem>
       </varlistentry>
 

Modified: branches/fix-links/tools/build/v2/doc/src/tasks.xml
==============================================================================
--- branches/fix-links/tools/build/v2/doc/src/tasks.xml (original)
+++ branches/fix-links/tools/build/v2/doc/src/tasks.xml 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -192,17 +192,16 @@
       <title>Alias</title>
 
       <para>
- The <functionname>alias</functionname> rule gives alternative name to
+ The <functionname>alias</functionname> rule gives an alternative name to
         a group of targets. For example, to give the name
         <filename>core</filename> to a group of three other targets with the
         following code:
         <programlisting>
 alias core : im reader writer ;</programlisting>
- Using <filename>core</filename> on the command line, or in the source list
- of any other target is the same as explicitly using
+ Using <filename>core</filename> on the command line, or in the source
+ list of any other target is the same as explicitly using
         <filename>im</filename>, <filename>reader</filename>, and
         <filename>writer</filename>, but it is just more convenient.
-
       </para>
 
 
@@ -214,7 +213,6 @@
 alias threads : /boost/thread//boost_thread : &lt;link&gt;static ;
 </programlisting>
         and use only the <code>threads</code> alias in your Jamfiles.
- <!-- changed name for clarity -->
       </para>
 
       <para>
@@ -224,14 +222,16 @@
 alias header_only_library : : : : &lt;include&gt;/usr/include/header_only_library ;
 </programlisting>
         then using <code>header_only_library</code> in sources will only add an
- include path. Also note that when there are some sources, their usage
- requirements are propagated, too. For example:
+ include path. Also note that when an alias has sources, their usage
+ requirements are propagated as well. For example:
 <programlisting>
-lib lib : lib.cpp : : : &lt;include&gt;. ;
-alias lib_alias ; <!-- This line can't possibly be correct!?? -->
-exe main : main.cpp lib_alias ;
+lib library1 : library1.cpp : : : &lt;include&gt;/library/include1 ;
+lib library2 : library2.cpp : : : &lt;include&gt;/library/include2 ;
+alias static_libraries : library1 library2 : &lt;link&gt;static ;
+exe main : main.cpp static_libraries ;
 </programlisting>
- will compile <filename>main.cpp</filename> with the additional include.
+ will compile <filename>main.cpp</filename> with additional includes
+ required for using the specified static libraries.
       </para>
  
     </section>

Modified: branches/fix-links/tools/build/v2/test/BoostBuild.py
==============================================================================
--- branches/fix-links/tools/build/v2/test/BoostBuild.py (original)
+++ branches/fix-links/tools/build/v2/test/BoostBuild.py 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -298,7 +298,7 @@
     def copy(self, src, dst):
         self.wait_for_time_change()
         try:
- self.write(dst, self.read(src))
+ self.write(dst, self.read(src, 1))
         except:
             self.fail_test(1)
 
@@ -306,13 +306,13 @@
         src_name = self.native_file_name(src)
         dst_name = self.native_file_name(dst)
         stats = os.stat(src_name)
- self.write(dst, self.read(src))
+ self.write(dst, self.read(src, 1))
         os.utime(dst_name, (stats.st_atime, stats.st_mtime))
         
     def touch(self, names):
         self.wait_for_time_change()
         for name in self.adjust_names(names):
- os.utime(self.native_file_name(name), None)
+ os.utime(self.native_file_name(name), None)
 
     def rm(self, names):
         self.wait_for_time_change()
@@ -437,12 +437,17 @@
                 result = result[0]
         return result
 
- def read(self, name):
+ def read(self, name, binary = 0):
         try:
             if self.toolset:
                 name = string.replace(name, "$toolset", self.toolset+"*")
             name = self.glob_file(name)
- return open(name, "rU").read()
+ openMode = "r"
+ if ( binary ):
+ openMode += "b"
+ else:
+ openMode += "U"
+ return open(name, openMode).read()
         except:
             annotation("reason", "Could not open '%s'" % name)
             self.fail_test(1)
@@ -461,7 +466,7 @@
         if condition and hasattr(self, 'difference'):
             f = StringIO()
             self.difference.pprint(f)
- annotation("changes causes by the last build command", f.getvalue())
+ annotation("changes caused by the last build command", f.getvalue())
             
         if condition and dump_stdio:
             self.dump_stdio()
@@ -522,7 +527,6 @@
         self.ignore_elements(self.unexpected_difference.modified_files, wildcard)
 
     def expect_touch(self, names):
-
         d = self.unexpected_difference
         for name in self.adjust_names(names):
 
@@ -662,7 +666,6 @@
 
     def maybe_do_diff(self, actual, expected):
         if os.environ.has_key("DO_DIFF") and os.environ["DO_DIFF"] != '':
-
             e = tempfile.mktemp("expected")
             a = tempfile.mktemp("actual")
             open(e, "w").write(expected)

Modified: branches/fix-links/tools/build/v2/test/empty.jam
==============================================================================
--- branches/fix-links/tools/build/v2/test/empty.jam (original)
+++ branches/fix-links/tools/build/v2/test/empty.jam 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -1,5 +1,5 @@
-# This file is empty; it just suppresses warnings
-
 # Copyright 2001 Dave Abrahams
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# This file is empty; it just suppresses warnings

Modified: branches/fix-links/tools/build/v2/test/inherit_toolset.py
==============================================================================
--- branches/fix-links/tools/build/v2/test/inherit_toolset.py (original)
+++ branches/fix-links/tools/build/v2/test/inherit_toolset.py 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -13,10 +13,10 @@
 """)
 
 t.write("yfc1.jam", """
-import toolset ;
-import generators ;
+import feature : extend ;
+import generators : register-standard ;
 
-toolset.register yfc1 ;
+feature.extend toolset : yfc1 ;
 
 rule init ( )
 {
@@ -34,14 +34,13 @@
 {
     yfc1-link
 }
-
-
 """)
 
 t.write("yfc2.jam", """
-import toolset ;
+import feature : extend ;
+import toolset : inherit ;
 
-toolset.register yfc2 ;
+feature.extend toolset : yfc2 ;
 toolset.inherit yfc2 : yfc1 ;
 
 rule init ( )

Modified: branches/fix-links/tools/build/v2/test/readme.txt
==============================================================================
--- branches/fix-links/tools/build/v2/test/readme.txt (original)
+++ branches/fix-links/tools/build/v2/test/readme.txt 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -1,7 +1,6 @@
-Comprehensive tests for Boost.Build v2; requires Python. To test, execute:
-
- python test_all.py
-
 # Copyright 2002 Dave Abrahams
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+ See test_system.html for detailed information on using the Boost Build test
+system.

Modified: branches/fix-links/tools/build/v2/test/searched_lib.py
==============================================================================
--- branches/fix-links/tools/build/v2/test/searched_lib.py (original)
+++ branches/fix-links/tools/build/v2/test/searched_lib.py 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -1,19 +1,19 @@
 #!/usr/bin/python
 
-# Copyright 2003 Dave Abrahams
-# Copyright 2003, 2004, 2005, 2006 Vladimir Prus
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+# Copyright 2003 Dave Abrahams
+# Copyright 2003, 2004, 2005, 2006 Vladimir Prus
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
 # Test usage of searched-libs: one which are found via -l
-# switch to the linker/compiler.
+# switch to the linker/compiler.
 
 from BoostBuild import Tester, get_toolset
 import string
 import os
 t = Tester()
 
-# To start with, we have to prepate a library to link with
+# To start with, we have to prepare a library to link with.
 t.write("lib/project-root.jam", "")
 t.write("lib/Jamfile", "lib test_lib : test_lib.cpp ;")
 t.write("lib/test_lib.cpp", """
@@ -28,7 +28,6 @@
 
 # Auto adjusting of suffixes does not work, since we need to
 # change dll to lib.
-#
 if (os.name == 'nt' or os.uname()[0].lower().startswith('cygwin')) and get_toolset() != 'gcc':
     t.copy("lib/bin/$toolset/debug/test_lib.implib", "lib/test_lib.implib")
     t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll")
@@ -104,7 +103,7 @@
 # A regression test: <library>property referring to
 # searched-lib was mishandled. As the result, we were
 # putting target name to the command line!
-# Note that
+# Note that
 # g++ ...... <.>z
 # works nicely in some cases, sending output from compiler
 # to file 'z'.

Modified: branches/fix-links/tools/build/v2/test/test_system.html
==============================================================================
--- branches/fix-links/tools/build/v2/test/test_system.html (original)
+++ branches/fix-links/tools/build/v2/test/test_system.html 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -91,7 +91,7 @@
     and scripts for automatically testing user-obversable behaviour. It uses
     components from testing systems of <a href=
     "http://www.scons.org">Scons</a> and <a href=
- "http://subversion.tigris.org">Subverion</a>, together with some
+ "http://subversion.tigris.org">Subversion</a>, together with some
     additional functionality.</p>
 
     <p>To run the tests you'd need:</p>

Modified: branches/fix-links/tools/build/v2/test/timedata.py
==============================================================================
--- branches/fix-links/tools/build/v2/test/timedata.py (original)
+++ branches/fix-links/tools/build/v2/test/timedata.py 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -22,7 +22,7 @@
     echo timed from $(>) >> $(<)
 }
 
-rule record_time ( target source : user : system )
+rule record_time ( target : source : start end user system )
 {
     ECHO record_time called: $(target) / $(source) / $(user) / $(system) ;
     __USER_TIME__ on $(target) = $(user) ;

Modified: branches/fix-links/tools/build/v2/tools/common.jam
==============================================================================
--- branches/fix-links/tools/build/v2/tools/common.jam (original)
+++ branches/fix-links/tools/build/v2/tools/common.jam 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -236,43 +236,56 @@
 # find the tool, a warning is issued.
 # If 'path-last' is specified, PATH is checked after 'additional-paths' when
 # searching to 'tool'.
-rule get-invocation-command (
+rule get-invocation-command-nodefault (
     toolset : tool : user-provided-command * : additional-paths * : path-last ? )
 {
     local command ;
     if ! $(user-provided-command)
     {
         command = [ common.find-tool $(tool) : $(additional-paths) : $(path-last) ] ;
- if ! $(command)
+ if ! $(command) && $(.debug-configuration)
         {
- if $(.debug-configuration)
- {
- ECHO "warning: toolset $(toolset) initialization: can't find tool $(tool)" ;
- ECHO "warning: initialized from" [ errors.nearest-user-location ] ;
- }
- command = $(tool) ;
- }
+ ECHO "warning: toolset $(toolset) initialization: can't find tool $(tool)" ;
+ ECHO "warning: initialized from" [ errors.nearest-user-location ] ;
+ }
     }
     else
     {
         command = [ common.check-tool $(user-provided-command) ] ;
- if ! $(command)
+ if ! $(command) && $(.debug-configuration)
         {
- if $(.debug-configuration)
- {
- ECHO "warning: toolset $(toolset) initialization: " ;
- ECHO "warning: can't find user-provided command " '$(user-provided-command)' ;
- ECHO "warning: initialized from" [ errors.nearest-user-location ] ;
- }
- # It's possible, in theory, that user-provided command is OK, but we're
- # not smart enough to understand that.
- command = $(user-provided-command) ;
- }
+ ECHO "warning: toolset $(toolset) initialization: " ;
+ ECHO "warning: can't find user-provided command " '$(user-provided-command)' ;
+ ECHO "warning: initialized from" [ errors.nearest-user-location ] ;
+ }
     }
 
     return $(command) ;
 }
 
+# Same as get-invocation-command-nodefault, except that if no tool
+# if found, returns either the user-provided-command, if present,
+# or the 'tool' parameter.
+rule get-invocation-command (
+ toolset : tool : user-provided-command * : additional-paths * : path-last ? )
+{
+ local result = [ get-invocation-command-nodefault $(toolset) : $(tool)
+ : $(user-provided-command) : $(additional-paths) : $(path-last) ] ;
+
+ if ! $(result)
+ {
+ if $(user-provided-command)
+ {
+ result = $(user-provided-command) ;
+ }
+ else
+ {
+ result = $(tool) ;
+ }
+ }
+ return $(result) ;
+}
+
 # Given an invocation command,
 # return the absolute path to the command. This works even if commnad
 # has not path element and is present in PATH.

Modified: branches/fix-links/tools/build/v2/tools/gcc.jam
==============================================================================
--- branches/fix-links/tools/build/v2/tools/gcc.jam (original)
+++ branches/fix-links/tools/build/v2/tools/gcc.jam 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -184,7 +184,7 @@
     
     #~ - The resource compiler.
     local rc =
- [ common.get-invocation-command gcc
+ [ common.get-invocation-command-nodefault gcc
             : windres : [ feature.get-values <rc> : $(options) ] : $(bin) : search-path ] ;
     local rc-type =
         [ feature.get-values <rc-type> : $(options) ] ;

Modified: branches/fix-links/tools/build/v2/tools/intel.jam
==============================================================================
--- branches/fix-links/tools/build/v2/tools/intel.jam (original)
+++ branches/fix-links/tools/build/v2/tools/intel.jam 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -16,11 +16,16 @@
 
 rule init ( * : * )
 {
- if [ os.name ] = LINUX || [ os.name ] = MACOSX
+ if [ os.name ] = LINUX
     {
         toolset.using intel-linux :
           $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
     }
+ else if [ os.name ] = MACOSX
+ {
+ toolset.using intel-darwin :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
     else
     {
         toolset.using intel-win :

Modified: branches/fix-links/tools/build/v2/tools/testing.jam
==============================================================================
--- branches/fix-links/tools/build/v2/tools/testing.jam (original)
+++ branches/fix-links/tools/build/v2/tools/testing.jam 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -509,7 +509,7 @@
 type.register TIME : time ;
 generators.register-standard testing.time : : TIME ;
 
-rule record-time ( target source : user : system )
+rule record-time ( target : source : start end user system )
 {
     local src-string = [$(source:G=:J=",")"] " ;
     USER_TIME on $(target) += $(src-string)$(user) ;

Modified: branches/fix-links/tools/build/v2/util/option.jam
==============================================================================
--- branches/fix-links/tools/build/v2/util/option.jam (original)
+++ branches/fix-links/tools/build/v2/util/option.jam 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -25,7 +25,7 @@
     # Check command-line args as soon as possible. For each option try
     # to load module named after option. Is that succeeds, invoke 'process'
     # rule in the module. The rule may return "true" to indicate that the
- # regular built process should not be attempted.
+ # regular build process should not be attempted.
     #
     # Options take the general form of: --<name>[=<value>] [<value>]
     #

Modified: branches/fix-links/tools/jam/doc/bjam.qbk
==============================================================================
--- branches/fix-links/tools/jam/doc/bjam.qbk (original)
+++ branches/fix-links/tools/jam/doc/bjam.qbk 2007-12-29 10:30:07 EST (Sat, 29 Dec 2007)
@@ -1773,7 +1773,7 @@
 * "Grist" is just a string prefix of the form </characters/>. It is used in Jam to create unique target names based on simpler names. For example, the file name "=test.exe=" may be used by targets in separate subprojects, or for the debug and release variants of the "same" abstract target. Each distinct target bound to a file called "test.exe" has its own unique grist prefix. The Boost build system also takes full advantage of Jam's ability to divide strings on grist boundaries, sometimes concatenating multiple gristed elements at the beginning of a string. Grist is used instead of identifying targets with absolute paths for two reasons:
 
    # The location of targets cannot always be derived solely from what the user puts in a Jamfile, but sometimes depends also on the binding process. Some mechanism to distinctly identify targets with the same name is still needed.
- # Grist allows us to use a uniform abstract identifier for each built target, regardless of target file location (as allowed by setting ALL_LOCATE_TARGET.
+ # Grist allows us to use a uniform abstract identifier for each built target, regardless of target file location (as allowed by setting ALL_LOCATE_TARGET).
 
 * When grist is extracted from a name with $(var:G), the result includes the leading and trailing angle brackets. When grist is added to a name with $(var:G=expr), existing grist is first stripped. Then, if expr is non-empty, leading <s and trailing >s are added if necessary to form an expression of the form <expr2>; <expr2> is then prepended.
 


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