|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2007-12-27 14:46:16
Author: eric_niebler
Date: 2007-12-27 14:46:11 EST (Thu, 27 Dec 2007)
New Revision: 42315
URL: http://svn.boost.org/trac/boost/changeset/42315
Log:
Merged revisions 42289-42314 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r42295 | vladimir_prus | 2007-12-25 04:11:37 -0500 (Tue, 25 Dec 2007) | 4 lines
Fix detection of RC compiler presense, and null obj fallback.
Thanks to Juergen Hunold for the bug report.
........
r42296 | vladimir_prus | 2007-12-25 04:25:25 -0500 (Tue, 25 Dec 2007) | 4 lines
Fix typos.
Patch from Jurko Gospodnetic
........
r42297 | vladimir_prus | 2007-12-25 04:28:05 -0500 (Tue, 25 Dec 2007) | 4 lines
Fix typos.
Patch from Jurko Gospodnetic.
........
r42298 | vladimir_prus | 2007-12-25 04:34:38 -0500 (Tue, 25 Dec 2007) | 5 lines
Correct an invalid alias example. Minor stylistic changes
changes in the alias rule documentation.
Patch from Jurko Gospodnetic.
........
r42299 | vladimir_prus | 2007-12-25 04:36:26 -0500 (Tue, 25 Dec 2007) | 2 lines
Remove unnecessary imports.
........
r42300 | vladimir_prus | 2007-12-25 04:38:19 -0500 (Tue, 25 Dec 2007) | 4 lines
Make inherit_toolset.py pass.
Patch from Jurko Gospodnetic.
........
r42301 | vladimir_prus | 2007-12-25 04:43:44 -0500 (Tue, 25 Dec 2007) | 5 lines
Make the Tester.copy method open files in binary mode.
This fixes the searched_lib.py failure on Windows.
Patch from Jurko Gospodnetic.
........
r42302 | grafik | 2007-12-25 11:09:42 -0500 (Tue, 25 Dec 2007) | 1 line
Fix missing close paren. Thanks to Jurko Gospodneti?\196?\135 for spotting the typo.
........
r42307 | turkanis | 2007-12-26 00:45:15 -0500 (Wed, 26 Dec 2007) | 1 line
ported changes from branches/iostreams_dev revisions 42265-42306
........
r42309 | noel_belcourt | 2007-12-26 17:17:03 -0500 (Wed, 26 Dec 2007) | 5 lines
Add support for intel-darwin toolset and fix
intel.jam to dispatch intel toolset on darwin to
intel-darwin.
........
r42310 | noel_belcourt | 2007-12-26 17:48:28 -0500 (Wed, 26 Dec 2007) | 9 lines
Comment out these two tests
[ test-iostreams stream_offset_32bit_test.cpp ]
[ test-iostreams stream_offset_64bit_test.cpp ]
since, apparently, these source files didn't get
added.
........
r42311 | noel_belcourt | 2007-12-26 19:37:52 -0500 (Wed, 26 Dec 2007) | 4 lines
Add missing iostreams files from iostreams_dev branch.
Re-enable these two tests.
........
Added:
branches/proto/v3/libs/iostreams/test/stream_offset_32bit_test.cpp
- copied unchanged from r42311, /trunk/libs/iostreams/test/stream_offset_32bit_test.cpp
branches/proto/v3/libs/iostreams/test/stream_offset_64bit_test.cpp
- copied unchanged from r42311, /trunk/libs/iostreams/test/stream_offset_64bit_test.cpp
branches/proto/v3/tools/build/v2/tools/intel-darwin.jam
- copied unchanged from r42311, /trunk/tools/build/v2/tools/intel-darwin.jam
Removed:
branches/proto/v3/libs/iostreams/test/offset_test.cpp
branches/proto/v3/libs/iostreams/test/positioning_test.cpp
Properties modified:
branches/proto/v3/ (props changed)
Text files modified:
branches/proto/v3/boost/iostreams/code_converter.hpp | 2
branches/proto/v3/boost/iostreams/compose.hpp | 5 +
branches/proto/v3/boost/iostreams/copy.hpp | 56 +++++++++------
branches/proto/v3/boost/iostreams/detail/adapter/concept_adapter.hpp | 3
branches/proto/v3/boost/iostreams/detail/adapter/non_blocking_adapter.hpp | 1
branches/proto/v3/boost/iostreams/detail/codecvt_holder.hpp | 2
branches/proto/v3/boost/iostreams/detail/config/disable_warnings.hpp | 6 +
branches/proto/v3/boost/iostreams/detail/functional.hpp | 104 ++++++++++++++++++-----------
branches/proto/v3/boost/iostreams/device/file_descriptor.hpp | 14 +++
branches/proto/v3/boost/iostreams/device/mapped_file.hpp | 16 +++
branches/proto/v3/boost/iostreams/filter/regex.hpp | 2
branches/proto/v3/boost/iostreams/filter/stdio.hpp | 5
branches/proto/v3/boost/iostreams/filter/symmetric.hpp | 2
branches/proto/v3/boost/iostreams/filter/test.hpp | 1
branches/proto/v3/boost/iostreams/pipeline.hpp | 2
branches/proto/v3/boost/iostreams/read.hpp | 2
branches/proto/v3/boost/iostreams/restrict.hpp | 39 +++++++++--
branches/proto/v3/boost/iostreams/skip.hpp | 49 ++++++++++---
branches/proto/v3/libs/iostreams/doc/tutorial/container_device.html | 4
branches/proto/v3/libs/iostreams/example/container_device.hpp | 6 +
branches/proto/v3/libs/iostreams/src/bzip2.cpp | 4
branches/proto/v3/libs/iostreams/src/file_descriptor.cpp | 9 ++
branches/proto/v3/libs/iostreams/src/zlib.cpp | 2
branches/proto/v3/libs/iostreams/test/Jamfile.v2 | 4
branches/proto/v3/libs/iostreams/test/close_test.cpp | 61 -----------------
branches/proto/v3/libs/iostreams/test/copy_test.cpp | 137 +++++++++++++++++++++++++++++++--------
branches/proto/v3/libs/iostreams/test/detail/closable.hpp | 8 +-
branches/proto/v3/libs/iostreams/test/detail/filters.hpp | 2
branches/proto/v3/libs/iostreams/test/detail/null_padded_codecvt.hpp | 10 ++
branches/proto/v3/libs/iostreams/test/detail/operation_sequence.hpp | 1
branches/proto/v3/libs/iostreams/test/detail/utf8_codecvt_facet.hpp | 2
branches/proto/v3/libs/iostreams/test/detail/verification.hpp | 91 +++++++++++++++++++++++++-
branches/proto/v3/libs/iostreams/test/execute_test.cpp | 50 +++++++++-----
branches/proto/v3/libs/iostreams/test/file_descriptor_test.cpp | 24 +++++++
branches/proto/v3/libs/iostreams/test/operation_sequence_test.cpp | 2
branches/proto/v3/libs/iostreams/test/stream_state_test.cpp | 6
branches/proto/v3/libs/iostreams/test/symmetric_filter_test.cpp | 2
branches/proto/v3/tools/build/v2/build/alias.jam | 3
branches/proto/v3/tools/build/v2/doc/src/advanced.xml | 6
branches/proto/v3/tools/build/v2/doc/src/reference.xml | 2
branches/proto/v3/tools/build/v2/doc/src/tasks.xml | 22 +++---
branches/proto/v3/tools/build/v2/test/BoostBuild.py | 19 +++--
branches/proto/v3/tools/build/v2/test/empty.jam | 4
branches/proto/v3/tools/build/v2/test/inherit_toolset.py | 13 +--
branches/proto/v3/tools/build/v2/test/readme.txt | 7 -
branches/proto/v3/tools/build/v2/test/searched_lib.py | 15 ++--
branches/proto/v3/tools/build/v2/test/test_system.html | 2
branches/proto/v3/tools/build/v2/tools/common.jam | 53 +++++++++-----
branches/proto/v3/tools/build/v2/tools/gcc.jam | 2
branches/proto/v3/tools/build/v2/tools/intel.jam | 7 +
branches/proto/v3/tools/build/v2/util/option.jam | 2
branches/proto/v3/tools/jam/doc/bjam.qbk | 2
52 files changed, 595 insertions(+), 300 deletions(-)
Modified: branches/proto/v3/boost/iostreams/code_converter.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/code_converter.hpp (original)
+++ branches/proto/v3/boost/iostreams/code_converter.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/compose.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/compose.hpp (original)
+++ branches/proto/v3/boost/iostreams/compose.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/copy.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/copy.hpp (original)
+++ branches/proto/v3/boost/iostreams/copy.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/detail/adapter/concept_adapter.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/detail/adapter/concept_adapter.hpp (original)
+++ branches/proto/v3/boost/iostreams/detail/adapter/concept_adapter.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/detail/adapter/non_blocking_adapter.hpp (original)
+++ branches/proto/v3/boost/iostreams/detail/adapter/non_blocking_adapter.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/detail/codecvt_holder.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/detail/codecvt_holder.hpp (original)
+++ branches/proto/v3/boost/iostreams/detail/codecvt_holder.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/detail/config/disable_warnings.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/detail/config/disable_warnings.hpp (original)
+++ branches/proto/v3/boost/iostreams/detail/config/disable_warnings.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/detail/functional.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/detail/functional.hpp (original)
+++ branches/proto/v3/boost/iostreams/detail/functional.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/device/file_descriptor.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/device/file_descriptor.hpp (original)
+++ branches/proto/v3/boost/iostreams/device/file_descriptor.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/device/mapped_file.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/device/mapped_file.hpp (original)
+++ branches/proto/v3/boost/iostreams/device/mapped_file.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/filter/regex.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/filter/regex.hpp (original)
+++ branches/proto/v3/boost/iostreams/filter/regex.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/filter/stdio.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/filter/stdio.hpp (original)
+++ branches/proto/v3/boost/iostreams/filter/stdio.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/filter/symmetric.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/filter/symmetric.hpp (original)
+++ branches/proto/v3/boost/iostreams/filter/symmetric.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/filter/test.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/filter/test.hpp (original)
+++ branches/proto/v3/boost/iostreams/filter/test.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/pipeline.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/pipeline.hpp (original)
+++ branches/proto/v3/boost/iostreams/pipeline.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/read.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/read.hpp (original)
+++ branches/proto/v3/boost/iostreams/read.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/restrict.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/restrict.hpp (original)
+++ branches/proto/v3/boost/iostreams/restrict.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/boost/iostreams/skip.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/skip.hpp (original)
+++ branches/proto/v3/boost/iostreams/skip.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/doc/tutorial/container_device.html
==============================================================================
--- branches/proto/v3/libs/iostreams/doc/tutorial/container_device.html (original)
+++ branches/proto/v3/libs/iostreams/doc/tutorial/container_device.html 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/example/container_device.hpp
==============================================================================
--- branches/proto/v3/libs/iostreams/example/container_device.hpp (original)
+++ branches/proto/v3/libs/iostreams/example/container_device.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/src/bzip2.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/src/bzip2.cpp (original)
+++ branches/proto/v3/libs/iostreams/src/bzip2.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/src/file_descriptor.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/src/file_descriptor.cpp (original)
+++ branches/proto/v3/libs/iostreams/src/file_descriptor.cpp 2007-12-27 14:46:11 EST (Thu, 27 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>
@@ -67,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) {
@@ -82,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 =
Modified: branches/proto/v3/libs/iostreams/src/zlib.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/src/zlib.cpp (original)
+++ branches/proto/v3/libs/iostreams/src/zlib.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/Jamfile.v2
==============================================================================
--- branches/proto/v3/libs/iostreams/test/Jamfile.v2 (original)
+++ branches/proto/v3/libs/iostreams/test/Jamfile.v2 2007-12-27 14:46:11 EST (Thu, 27 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,8 @@
[ 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 ]
Modified: branches/proto/v3/libs/iostreams/test/close_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/close_test.cpp (original)
+++ branches/proto/v3/libs/iostreams/test/close_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/copy_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/copy_test.cpp (original)
+++ branches/proto/v3/libs/iostreams/test/copy_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/detail/closable.hpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/detail/closable.hpp (original)
+++ branches/proto/v3/libs/iostreams/test/detail/closable.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/detail/filters.hpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/detail/filters.hpp (original)
+++ branches/proto/v3/libs/iostreams/test/detail/filters.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/detail/null_padded_codecvt.hpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/detail/null_padded_codecvt.hpp (original)
+++ branches/proto/v3/libs/iostreams/test/detail/null_padded_codecvt.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/detail/operation_sequence.hpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/detail/operation_sequence.hpp (original)
+++ branches/proto/v3/libs/iostreams/test/detail/operation_sequence.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/detail/utf8_codecvt_facet.hpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/detail/utf8_codecvt_facet.hpp (original)
+++ branches/proto/v3/libs/iostreams/test/detail/utf8_codecvt_facet.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/detail/verification.hpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/detail/verification.hpp (original)
+++ branches/proto/v3/libs/iostreams/test/detail/verification.hpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/execute_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/execute_test.cpp (original)
+++ branches/proto/v3/libs/iostreams/test/execute_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/file_descriptor_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/file_descriptor_test.cpp (original)
+++ branches/proto/v3/libs/iostreams/test/file_descriptor_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/offset_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/offset_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/operation_sequence_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/operation_sequence_test.cpp (original)
+++ branches/proto/v3/libs/iostreams/test/operation_sequence_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/positioning_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/positioning_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/libs/iostreams/test/stream_state_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/stream_state_test.cpp (original)
+++ branches/proto/v3/libs/iostreams/test/stream_state_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 Dec 2007)
@@ -38,15 +38,15 @@
typedef char char_type;
typedef seekable_device_tag category;
error_device(char const*) {}
- std::streamsize read(char_type* s, std::streamsize n)
+ std::streamsize read(char_type*, std::streamsize)
{
throw detail::bad_read();
}
- std::streamsize write(const char_type* s, std::streamsize n)
+ std::streamsize write(const char_type*, std::streamsize)
{
throw detail::bad_write();
}
- std::streampos seek(stream_offset off, BOOST_IOS::seekdir way)
+ std::streampos seek(stream_offset, BOOST_IOS::seekdir)
{
throw detail::bad_seek();
}
Modified: branches/proto/v3/libs/iostreams/test/symmetric_filter_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/symmetric_filter_test.cpp (original)
+++ branches/proto/v3/libs/iostreams/test/symmetric_filter_test.cpp 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/build/alias.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/build/alias.jam (original)
+++ branches/proto/v3/tools/build/v2/build/alias.jam 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/doc/src/advanced.xml
==============================================================================
--- branches/proto/v3/tools/build/v2/doc/src/advanced.xml (original)
+++ branches/proto/v3/tools/build/v2/doc/src/advanced.xml 2007-12-27 14:46:11 EST (Thu, 27 Dec 2007)
@@ -777,10 +777,10 @@
such as defines. It can be also useful for ordinary properties. Consider
this example:
<programlisting>
-project test : requirements <threading;>multi ;
+project test : requirements <threading>multi ;
exe test1 : test1.cpp ;
-exe test2 : test2.cpp : <threading;>single ;
-exe test3 : test3.cpp : -<threading;>multi ;
+exe test2 : test2.cpp : <threading>single ;
+exe test3 : test3.cpp : -<threading>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/proto/v3/tools/build/v2/doc/src/reference.xml
==============================================================================
--- branches/proto/v3/tools/build/v2/doc/src/reference.xml (original)
+++ branches/proto/v3/tools/build/v2/doc/src/reference.xml 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/doc/src/tasks.xml
==============================================================================
--- branches/proto/v3/tools/build/v2/doc/src/tasks.xml (original)
+++ branches/proto/v3/tools/build/v2/doc/src/tasks.xml 2007-12-27 14:46:11 EST (Thu, 27 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 : <link>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 : : : : <include>/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 : : : <include>. ;
-alias lib_alias ; <!-- This line can't possibly be correct!?? -->
-exe main : main.cpp lib_alias ;
+lib library1 : library1.cpp : : : <include>/library/include1 ;
+lib library2 : library2.cpp : : : <include>/library/include2 ;
+alias static_libraries : library1 library2 : <link>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/proto/v3/tools/build/v2/test/BoostBuild.py
==============================================================================
--- branches/proto/v3/tools/build/v2/test/BoostBuild.py (original)
+++ branches/proto/v3/tools/build/v2/test/BoostBuild.py 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/test/empty.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/test/empty.jam (original)
+++ branches/proto/v3/tools/build/v2/test/empty.jam 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/test/inherit_toolset.py
==============================================================================
--- branches/proto/v3/tools/build/v2/test/inherit_toolset.py (original)
+++ branches/proto/v3/tools/build/v2/test/inherit_toolset.py 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/test/readme.txt
==============================================================================
--- branches/proto/v3/tools/build/v2/test/readme.txt (original)
+++ branches/proto/v3/tools/build/v2/test/readme.txt 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/test/searched_lib.py
==============================================================================
--- branches/proto/v3/tools/build/v2/test/searched_lib.py (original)
+++ branches/proto/v3/tools/build/v2/test/searched_lib.py 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/test/test_system.html
==============================================================================
--- branches/proto/v3/tools/build/v2/test/test_system.html (original)
+++ branches/proto/v3/tools/build/v2/test/test_system.html 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/tools/common.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/tools/common.jam (original)
+++ branches/proto/v3/tools/build/v2/tools/common.jam 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/tools/gcc.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/tools/gcc.jam (original)
+++ branches/proto/v3/tools/build/v2/tools/gcc.jam 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/tools/intel.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/tools/intel.jam (original)
+++ branches/proto/v3/tools/build/v2/tools/intel.jam 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/build/v2/util/option.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/util/option.jam (original)
+++ branches/proto/v3/tools/build/v2/util/option.jam 2007-12-27 14:46:11 EST (Thu, 27 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/proto/v3/tools/jam/doc/bjam.qbk
==============================================================================
--- branches/proto/v3/tools/jam/doc/bjam.qbk (original)
+++ branches/proto/v3/tools/jam/doc/bjam.qbk 2007-12-27 14:46:11 EST (Thu, 27 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