Patch from Index: boost-release/boost/iostreams/device/mapped_file.hpp =================================================================== --- boost-release.orig/boost/iostreams/device/mapped_file.hpp 2009-11-11 22:48:31.000000000 +0000 +++ boost-release/boost/iostreams/device/mapped_file.hpp 2009-11-11 22:50:32.000000000 +0000 @@ -25,6 +25,7 @@ #include #include #include +#include #include // Must come last. @@ -393,10 +394,10 @@ param_type params(p); if (params.flags) { if (params.flags != mapped_file::readonly) - throw BOOST_IOSTREAMS_FAILURE("invalid flags"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags")); } else { if (params.mode & BOOST_IOS::out) - throw BOOST_IOSTREAMS_FAILURE("invalid mode"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid mode")); params.mode |= BOOST_IOS::in; } open_impl(params); @@ -479,10 +480,10 @@ param_type params(p); if (params.flags) { if (params.flags & mapped_file::readonly) - throw BOOST_IOSTREAMS_FAILURE("invalid flags"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags")); } else { if (params.mode & BOOST_IOS::in) - throw BOOST_IOSTREAMS_FAILURE("invalid mode"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid mode")); params.mode |= BOOST_IOS::out; } mapped_file::open(params); Index: boost-release/boost/iostreams/detail/adapter/direct_adapter.hpp =================================================================== --- boost-release.orig/boost/iostreams/detail/adapter/direct_adapter.hpp 2009-11-11 22:49:19.000000000 +0000 +++ boost-release/boost/iostreams/detail/adapter/direct_adapter.hpp 2009-11-11 22:50:32.000000000 +0000 @@ -30,6 +30,7 @@ #include #include #include +#include #include // Must come last. @@ -209,7 +210,7 @@ using namespace std; pointers& put = ptrs_.second(); if (n > static_cast(put.end - put.ptr)) - throw write_area_exhausted(); + boost::throw_exception(write_area_exhausted()); std::copy(s, s + n, put.ptr); put.ptr += n; return n; @@ -224,7 +225,7 @@ pointers& get = ptrs_.first(); pointers& put = ptrs_.second(); if (way == BOOST_IOS::cur && get.ptr != put.ptr) - throw bad_seek(); + boost::throw_exception(bad_seek()); ptrdiff_t next = 0; if ((which & BOOST_IOS::in) || !is_double::value) { if (way == BOOST_IOS::beg) @@ -236,7 +237,7 @@ if (next >= 0 && next <= get.end - get.beg) get.ptr = get.beg + next; else - throw bad_seek(); + boost::throw_exception(bad_seek()); } if ((which & BOOST_IOS::out) && is_double::value) { if (way == BOOST_IOS::beg) @@ -248,7 +249,7 @@ if (next >= 0 && next <= put.end - put.beg) put.ptr = put.beg + next; else - throw bad_seek(); + boost::throw_exception(bad_seek()); } return offset_to_position(next); } Index: boost-release/boost/iostreams/detail/adapter/concept_adapter.hpp =================================================================== --- boost-release.orig/boost/iostreams/detail/adapter/concept_adapter.hpp 2009-11-11 22:49:19.000000000 +0000 +++ boost-release/boost/iostreams/detail/adapter/concept_adapter.hpp 2009-11-11 22:50:32.000000000 +0000 @@ -22,6 +22,7 @@ #include #include #include +#include // Must come last. #include // MSVC. @@ -137,7 +138,7 @@ seek( Device&, stream_offset, BOOST_IOS::seekdir, BOOST_IOS::openmode, any_tag ) { - throw cant_seek(); + boost::throw_exception(cant_seek()); } template @@ -171,7 +172,7 @@ static std::streamsize write( Device&, Dummy*, const typename char_type_of::type*, std::streamsize ) - { throw cant_write(); } + { boost::throw_exception(cant_write()); } }; template<> @@ -179,7 +180,7 @@ template static std::streamsize read(Device&, Dummy*, typename char_type_of::type*, std::streamsize) - { throw cant_read(); } + { boost::throw_exception(cant_read()); } template static std::streamsize @@ -205,7 +206,7 @@ static std::streampos seek( Filter&, Device*, stream_offset, BOOST_IOS::seekdir, BOOST_IOS::openmode, any_tag ) - { throw cant_seek(); } + { boost::throw_exception(cant_seek()); } template static std::streampos @@ -252,7 +253,7 @@ static std::streamsize write( Filter&, Sink*, const typename char_type_of::type*, std::streamsize ) - { throw cant_write(); } + { boost::throw_exception(cant_write()); } }; template<> @@ -260,7 +261,7 @@ template static std::streamsize read(Filter&, Source*, typename char_type_of::type*,std::streamsize) - { throw cant_read(); } + { boost::throw_exception(cant_read()); } template static std::streamsize Index: boost-release/boost/iostreams/detail/adapter/range_adapter.hpp =================================================================== --- boost-release.orig/boost/iostreams/detail/adapter/range_adapter.hpp 2009-11-11 22:49:19.000000000 +0000 +++ boost-release/boost/iostreams/detail/adapter/range_adapter.hpp 2009-11-11 22:50:32.000000000 +0000 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -116,7 +117,7 @@ { while (cur != last && n-- > 0) *cur++ = *s++; if (cur == last && n > 0) - throw write_area_exhausted(); + boost::throw_exception(write_area_exhausted()); return n; } }; @@ -144,7 +145,7 @@ std::copy(s, s + count, cur); cur += count; if (count < n) - throw write_area_exhausted(); + boost::throw_exception(write_area_exhausted()); return n; } @@ -156,18 +157,21 @@ using namespace std; switch (way) { case BOOST_IOS::beg: - if (off > last - first || off < 0) throw bad_seek(); + if (off > last - first || off < 0) + boost::throw_exception(bad_seek()); cur = first + off; break; case BOOST_IOS::cur: { std::ptrdiff_t newoff = cur - first + off; - if (newoff > last - first || newoff < 0) throw bad_seek(); + if (newoff > last - first || newoff < 0) + boost::throw_exception(bad_seek()); cur += off; break; } case BOOST_IOS::end: - if (last - first + off < 0 || off > 0) throw bad_seek(); + if (last - first + off < 0 || off > 0) + boost::throw_exception(bad_seek()); cur = last + off; break; default: Index: boost-release/boost/iostreams/detail/system_failure.hpp =================================================================== --- boost-release.orig/boost/iostreams/detail/system_failure.hpp 2009-11-11 22:48:31.000000000 +0000 +++ boost-release/boost/iostreams/detail/system_failure.hpp 2009-11-11 22:50:32.000000000 +0000 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include // failure. @@ -73,10 +74,10 @@ { return system_failure(msg.c_str()); } inline void throw_system_failure(const char* msg) -{ throw system_failure(msg); } +{ boost::throw_exception(system_failure(msg)); } inline void throw_system_failure(const std::string& msg) -{ throw system_failure(msg); } +{ boost::throw_exception(system_failure(msg)); } } } } // End namespaces detail, iostreams, boost. Index: boost-release/boost/iostreams/detail/streambuf/indirect_streambuf.hpp =================================================================== --- boost-release.orig/boost/iostreams/detail/streambuf/indirect_streambuf.hpp 2009-11-11 22:49:21.000000000 +0000 +++ boost-release/boost/iostreams/detail/streambuf/indirect_streambuf.hpp 2009-11-11 22:50:32.000000000 +0000 @@ -35,6 +35,7 @@ #include #include #include +#include #include // Must come last. @@ -274,7 +275,7 @@ *gptr() = traits_type::to_char_type(c); return traits_type::not_eof(c); } else { - throw bad_putback(); + boost::throw_exception(bad_putback()); } } Index: boost-release/boost/iostreams/detail/streambuf/direct_streambuf.hpp =================================================================== --- boost-release.orig/boost/iostreams/detail/streambuf/direct_streambuf.hpp 2009-11-11 22:49:21.000000000 +0000 +++ boost-release/boost/iostreams/detail/streambuf/direct_streambuf.hpp 2009-11-11 22:53:34.000000000 +0000 @@ -29,6 +29,7 @@ #include #include #include +#include // Must come last. #include // MSVC. @@ -138,7 +139,7 @@ direct_streambuf::underflow() { if (!ibeg_) - throw cant_read(); + boost::throw_exception(cant_read()); if (!gptr()) init_get_area(); return gptr() != iend_ ? @@ -152,14 +153,14 @@ { using namespace std; if (!ibeg_) - throw cant_read(); + boost::throw_exception(cant_read()); if (gptr() != 0 && gptr() != ibeg_) { gbump(-1); if (!traits_type::eq_int_type(c, traits_type::eof())) *gptr() = traits_type::to_char_type(c); return traits_type::not_eof(c); } - throw bad_putback(); + boost::throw_exception(bad_putback()); } template @@ -167,11 +168,14 @@ direct_streambuf::overflow(int_type c) { using namespace std; - if (!obeg_) throw BOOST_IOSTREAMS_FAILURE("no write access"); + if (!obeg_) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("no write access")); if (!pptr()) init_put_area(); if (!traits_type::eq_int_type(c, traits_type::eof())) { if (pptr() == oend_) - throw BOOST_IOSTREAMS_FAILURE("write area exhausted"); + boost::throw_exception( + BOOST_IOSTREAMS_FAILURE("write area exhausted") + ); *pptr() = traits_type::to_char_type(c); pbump(1); return c; @@ -215,7 +219,7 @@ using namespace std; BOOST_IOS::openmode both = BOOST_IOS::in | BOOST_IOS::out; if (two_head() && (which & both) == both) - throw bad_seek(); + boost::throw_exception(bad_seek()); stream_offset result = -1; bool one = one_head(); if (one && (pptr() != 0 || gptr()== 0)) @@ -230,7 +234,7 @@ default: assert(0); } if (next < 0 || next > (iend_ - ibeg_)) - throw bad_seek(); + boost::throw_exception(bad_seek()); setg(ibeg_, ibeg_ + next, iend_); result = next; } @@ -244,7 +248,7 @@ default: assert(0); } if (next < 0 || next > (oend_ - obeg_)) - throw bad_seek(); + boost::throw_exception(bad_seek()); pbump(static_cast(next - (pptr() - obeg_))); result = next; } Index: boost-release/libs/iostreams/src/zlib.cpp =================================================================== --- boost-release.orig/libs/iostreams/src/zlib.cpp 2009-11-11 22:48:31.000000000 +0000 +++ boost-release/libs/iostreams/src/zlib.cpp 2009-11-11 22:50:32.000000000 +0000 @@ -14,6 +14,7 @@ // than using it (possibly importing code). #define BOOST_IOSTREAMS_SOURCE +#include #include #include #include "zlib.h" // Jean-loup Gailly's and Mark Adler's "zlib.h" header. @@ -78,9 +79,9 @@ //case Z_BUF_ERROR: return; case Z_MEM_ERROR: - throw std::bad_alloc(); + boost::throw_exception(std::bad_alloc()); default: - throw zlib_error(error); + boost::throw_exception(zlib_error(error)); ; } } Index: boost-release/libs/iostreams/src/mapped_file.cpp =================================================================== --- boost-release.orig/libs/iostreams/src/mapped_file.cpp 2009-11-11 22:48:31.000000000 +0000 +++ boost-release/libs/iostreams/src/mapped_file.cpp 2009-11-11 22:50:32.000000000 +0000 @@ -14,6 +14,7 @@ #include #include #include +#include #ifdef BOOST_IOSTREAMS_WINDOWS # define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers @@ -82,7 +83,7 @@ void mapped_file_impl::open(param_type p) { if (is_open()) - throw BOOST_IOSTREAMS_FAILURE("file already open"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("file already open")); p.normalize(); open_file(p); map_file(p); // May modify p.hint @@ -110,13 +111,19 @@ void mapped_file_impl::resize(stream_offset new_size) { if (!is_open()) - throw BOOST_IOSTREAMS_FAILURE("file is closed"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("file is closed")); if (flags() & mapped_file::priv) - throw BOOST_IOSTREAMS_FAILURE("can't resize private mapped file"); + boost::throw_exception( + BOOST_IOSTREAMS_FAILURE("can't resize private mapped file") + ); if (!(flags() & mapped_file::readwrite)) - throw BOOST_IOSTREAMS_FAILURE("can't resize readonly mapped file"); + boost::throw_exception( + BOOST_IOSTREAMS_FAILURE("can't resize readonly mapped file") + ); if (params_.offset >= new_size) - throw BOOST_IOSTREAMS_FAILURE("can't resize below mapped offset"); + boost::throw_exception( + BOOST_IOSTREAMS_FAILURE("can't resize below mapped offset") + ); if (!unmap_file()) cleanup_and_throw("failed unmapping file"); #ifdef BOOST_IOSTREAMS_WINDOWS @@ -335,7 +342,7 @@ p.hint = 0; try_map_file(p); } else { - throw e; + boost::throw_exception(e); } } } @@ -393,9 +400,9 @@ void mapped_file_params_base::normalize() { if (mode && flags) - throw BOOST_IOSTREAMS_FAILURE( + boost::throw_exception(BOOST_IOSTREAMS_FAILURE( "at most one of 'mode' and 'flags' may be specified" - ); + )); if (flags) { switch (flags) { case mapped_file::readonly: @@ -403,7 +410,7 @@ case mapped_file::priv: break; default: - throw BOOST_IOSTREAMS_FAILURE("invalid flags"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags")); } } else { flags = (mode & BOOST_IOS::out) ? @@ -412,9 +419,11 @@ mode = BOOST_IOS::openmode(); } if (offset < 0) - throw BOOST_IOSTREAMS_FAILURE("invalid offset"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid offset")); if (new_file_size < 0) - throw BOOST_IOSTREAMS_FAILURE("invalid new file size"); + boost::throw_exception( + BOOST_IOSTREAMS_FAILURE("invalid new file size") + ); } } // End namespace detail. Index: boost-release/libs/iostreams/src/bzip2.cpp =================================================================== --- boost-release.orig/libs/iostreams/src/bzip2.cpp 2009-11-11 22:48:31.000000000 +0000 +++ boost-release/libs/iostreams/src/bzip2.cpp 2009-11-11 22:50:32.000000000 +0000 @@ -14,6 +14,7 @@ // than using it (possibly importing code). #define BOOST_IOSTREAMS_SOURCE +#include #include #include #include "bzlib.h" // Julian Seward's "bzip.h" header. @@ -65,9 +66,9 @@ case BZ_STREAM_END: return; case BZ_MEM_ERROR: - throw std::bad_alloc(); + boost::throw_exception(std::bad_alloc()); default: - throw bzip2_error(error); + boost::throw_exception(bzip2_error(error)); } } Index: boost-release/libs/iostreams/src/gzip.cpp =================================================================== --- boost-release.orig/libs/iostreams/src/gzip.cpp 2009-11-11 22:48:31.000000000 +0000 +++ boost-release/libs/iostreams/src/gzip.cpp 2009-11-11 22:50:32.000000000 +0000 @@ -15,7 +15,8 @@ #define BOOST_IOSTREAMS_SOURCE #include -#include +#include +#include namespace boost { namespace iostreams { @@ -29,17 +30,17 @@ switch (state_) { case s_id1: if (value != gzip::magic::id1) - throw gzip_error(gzip::bad_header); + boost::throw_exception(gzip_error(gzip::bad_header)); state_ = s_id2; break; case s_id2: if (value != gzip::magic::id2) - throw gzip_error(gzip::bad_header); + boost::throw_exception(gzip_error(gzip::bad_header)); state_ = s_cm; break; case s_cm: if (value != gzip::method::deflate) - throw gzip_error(gzip::bad_method); + boost::throw_exception(gzip_error(gzip::bad_method)); state_ = s_flg; break; case s_flg: Index: boost-release/libs/iostreams/src/file_descriptor.cpp =================================================================== --- boost-release.orig/libs/iostreams/src/file_descriptor.cpp 2009-11-11 22:48:31.000000000 +0000 +++ boost-release/libs/iostreams/src/file_descriptor.cpp 2009-11-11 22:50:32.000000000 +0000 @@ -22,6 +22,7 @@ #include // openmodes, failure. #include #include +#include // OS-specific headers for low-level i/o. @@ -108,7 +109,7 @@ (BOOST_IOS::in | BOOST_IOS::out) ) { if (mode & BOOST_IOS::app) - throw BOOST_IOSTREAMS_FAILURE("bad open mode"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad open mode")); dwDesiredAccess = GENERIC_READ | GENERIC_WRITE; dwCreationDisposition = (mode & BOOST_IOS::trunc) ? @@ -116,7 +117,7 @@ OPEN_EXISTING; } else if (mode & BOOST_IOS::in) { if (mode & (BOOST_IOS::app |BOOST_IOS::trunc)) - throw BOOST_IOSTREAMS_FAILURE("bad open mode"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad open mode")); dwDesiredAccess = GENERIC_READ; dwCreationDisposition = OPEN_EXISTING; } else if (mode & BOOST_IOS::out) { @@ -125,7 +126,7 @@ if (mode & BOOST_IOS::app) flags_ |= append; } else { - throw BOOST_IOSTREAMS_FAILURE("bad open mode"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad open mode")); } HANDLE handle = p.is_wide() ? @@ -186,7 +187,7 @@ int fd = BOOST_IOSTREAMS_FD_OPEN(p.c_str(), oflag, pmode); if (fd == -1) { - throw system_failure("failed opening file"); + boost::throw_exception(system_failure("failed opening file")); } else { handle_ = fd; flags_ = close_on_exit; @@ -271,7 +272,7 @@ if ( dwResultLow == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR ) { - throw system_failure("failed seeking"); + boost::throw_exception(system_failure("failed seeking")); } else { return offset_to_position( (stream_offset(lDistanceToMoveHigh) << 32) + dwResultLow @@ -281,7 +282,7 @@ if ( off > integer_traits::const_max || off < integer_traits::const_min ) { - throw BOOST_IOSTREAMS_FAILURE("bad offset"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset")); } stream_offset result = BOOST_IOSTREAMS_FD_SEEK( @@ -294,7 +295,7 @@ SEEK_END ) ); if (result == -1) - throw system_failure("failed seeking"); + boost::throw_exception(system_failure("failed seeking")); return offset_to_position(result); #endif // #ifdef BOOST_IOSTREAMS_WINDOWS } @@ -431,7 +432,7 @@ const detail::path& path, BOOST_IOS::openmode mode) { if (mode & (BOOST_IOS::out | BOOST_IOS::app | BOOST_IOS::trunc)) - throw BOOST_IOSTREAMS_FAILURE("invalid mode"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid mode")); file_descriptor::open(path, mode, BOOST_IOS::in); } @@ -482,7 +483,7 @@ const detail::path& path, BOOST_IOS::openmode mode) { if (mode & BOOST_IOS::in) - throw BOOST_IOSTREAMS_FAILURE("invalid mode"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid mode")); file_descriptor::open(path, mode, BOOST_IOS::out); } Index: boost-release/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp =================================================================== --- boost-release.orig/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp 2009-11-11 22:51:01.000000000 +0000 +++ boost-release/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp 2009-11-11 22:51:39.000000000 +0000 @@ -9,6 +9,7 @@ #define BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_BUFFER_HPP_INCLUDED #include +#include namespace boost { namespace iostreams { @@ -179,7 +180,7 @@ void check_open() { if (this->is_open()) - throw BOOST_IOSTREAMS_FAILURE("already open"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("already open")); } }; Index: boost-release/boost/iostreams/chain.hpp =================================================================== --- boost-release.orig/boost/iostreams/chain.hpp 2009-11-11 23:02:08.000000000 +0000 +++ boost-release/boost/iostreams/chain.hpp 2009-11-11 23:02:37.000000000 +0000 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include // VC6.5 requires this @@ -172,7 +173,7 @@ const std::type_info& component_type(int n) const { if (static_cast(n) >= size()) - throw std::out_of_range("bad chain offset"); + boost::throw_exception(std::out_of_range("bad chain offset")); return (*boost::next(list().begin(), n))->component_type(); } @@ -196,7 +197,7 @@ T* component(int n, boost::type) const { if (static_cast(n) >= size()) - throw std::out_of_range("bad chain offset"); + boost::throw_exception(std::out_of_range("bad chain offset")); streambuf_type* link = *boost::next(list().begin(), n); if (BOOST_IOSTREAMS_COMPARE_TYPE_ID(link->component_type(), typeid(T))) return static_cast(link->component_impl()); @@ -238,7 +239,7 @@ typedef typename list_type::iterator iterator; BOOST_STATIC_ASSERT((is_convertible::value)); if (is_complete()) - throw std::logic_error("chain complete"); + boost::throw_exception(std::logic_error("chain complete")); streambuf_type* prev = !empty() ? list().back() : 0; buffer_size = buffer_size != -1 ? Index: boost-release/boost/iostreams/checked_operations.hpp =================================================================== --- boost-release.orig/boost/iostreams/checked_operations.hpp 2009-11-11 22:57:47.000000000 +0000 +++ boost-release/boost/iostreams/checked_operations.hpp 2009-11-11 22:58:52.000000000 +0000 @@ -20,6 +20,7 @@ #include #include #include +#include // Must come last. #include // MSVC. @@ -93,24 +94,24 @@ template static bool put(T&, typename char_type_of::type) - { throw cant_write(); } + { boost::throw_exception(cant_write()); } template static std::streamsize write(T&, const typename char_type_of::type*, std::streamsize) - { throw cant_write(); } + { boost::throw_exception(cant_write()); } }; template<> struct read_write_if_impl { template static typename int_type_of::type get(T&) - { throw cant_read(); } + { boost::throw_exception(cant_read()); } template static std::streamsize read(T&, typename char_type_of::type*, std::streamsize) - { throw cant_read(); } + { boost::throw_exception(cant_read()); } template static bool put(T& t, typename char_type_of::type c) @@ -139,7 +140,7 @@ template static std::streampos seek(T&, stream_offset, BOOST_IOS::seekdir, BOOST_IOS::openmode) - { throw cant_seek(); } + { boost::throw_exception(cant_seek()); } }; } // End namespace detail. Index: boost-release/boost/iostreams/code_converter.hpp =================================================================== --- boost-release.orig/boost/iostreams/code_converter.hpp 2009-11-11 22:59:07.000000000 +0000 +++ boost-release/boost/iostreams/code_converter.hpp 2009-11-11 22:59:45.000000000 +0000 @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -155,7 +156,7 @@ void open(const Device& dev, int buffer_size) { if (flags_ & f_open) - throw BOOST_IOSTREAMS_FAILURE("already open"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("already open")); if (buffer_size == -1) buffer_size = default_filter_buffer_size; int max_length = cvt_.get().max_length(); @@ -354,7 +355,7 @@ case std::codecvt_base::error: default: buf.state() = state_type(); - throw code_conversion_error(); + boost::throw_exception(code_conversion_error()); } } while (total < n && status != EOF && status != WOULD_BLOCK); @@ -407,7 +408,7 @@ case std::codecvt_base::error: default: buf.state() = state_type(); - throw code_conversion_error(); + boost::throw_exception(code_conversion_error()); } } return total; Index: boost-release/boost/iostreams/detail/restrict_impl.hpp =================================================================== --- boost-release.orig/boost/iostreams/detail/restrict_impl.hpp 2009-11-11 22:53:57.000000000 +0000 +++ boost-release/boost/iostreams/detail/restrict_impl.hpp 2009-11-11 22:54:35.000000000 +0000 @@ -44,6 +44,7 @@ # include // mode_of, is_direct. # include # include +# include # include # include @@ -248,7 +249,7 @@ end_(len != -1 ? off + len : -1) { if (len < -1 || off < 0) - throw BOOST_IOSTREAMS_FAILURE("bad offset"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset")); iostreams::skip(this->component(), off); } @@ -314,7 +315,7 @@ if ( off < 0 || len < -1 || (len != -1 && off + len > seq.second - seq.first) ) { - throw BOOST_IOSTREAMS_FAILURE("bad offset"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset")); } beg_ = seq.first + off; end_ = len != -1 ? @@ -357,7 +358,7 @@ pos_(off), end_(len != -1 ? off + len : -1), open_(false) { if (len < -1 || off < 0) - throw BOOST_IOSTREAMS_FAILURE("bad offset"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset")); } } // End namespace detail. Index: boost-release/boost/iostreams/filter/gzip.hpp =================================================================== --- boost-release.orig/boost/iostreams/filter/gzip.hpp 2009-11-11 22:56:04.000000000 +0000 +++ boost-release/boost/iostreams/filter/gzip.hpp 2009-11-11 22:56:51.000000000 +0000 @@ -36,7 +36,8 @@ #include #include #include -#include +#include +#include // Must come last. #if defined(BOOST_MSVC) @@ -417,7 +418,7 @@ if (state_ == s_header) { int c = boost::iostreams::get(peek); if (traits_type::is_eof(c)) { - throw gzip_error(gzip::bad_header); + boost::throw_exception(gzip_error(gzip::bad_header)); } else if (traits_type::would_block(c)) { break; } @@ -437,19 +438,19 @@ state_ = s_footer; } } catch (const zlib_error& e) { - throw gzip_error(e); + boost::throw_exception(gzip_error(e)); } } else { // state_ == s_footer int c = boost::iostreams::get(peek); if (traits_type::is_eof(c)) { - throw gzip_error(gzip::bad_footer); + boost::throw_exception(gzip_error(gzip::bad_footer)); } else if (traits_type::would_block(c)) { break; } footer_.process(c); if (footer_.done()) { if (footer_.crc() != this->crc()) - throw gzip_error(gzip::bad_crc); + boost::throw_exception(gzip_error(gzip::bad_crc)); int c = boost::iostreams::get(peek); if (traits_type::is_eof(c)) { state_ = s_done; @@ -482,7 +483,7 @@ state_ = s_start; header_.reset(); footer_.reset(); - throw gzip_error(e); + boost::throw_exception(gzip_error(e)); } state_ = s_start; } Index: boost-release/boost/iostreams/filter/newline.hpp =================================================================== --- boost-release.orig/boost/iostreams/filter/newline.hpp 2009-11-11 22:57:05.000000000 +0000 +++ boost-release/boost/iostreams/filter/newline.hpp 2009-11-11 22:57:34.000000000 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include #include // Must come last. @@ -124,7 +125,7 @@ target != newline::dos && target != newline::mac ) { - throw std::logic_error("bad flags"); + boost::throw_exception(std::logic_error("bad flags")); } } @@ -420,7 +421,7 @@ } } private: - void fail() { throw newline_error(source()); } + void fail() { boost::throw_exception(newline_error(source())); } int& source() { return flags_; } int source() const { return flags_; } Index: boost-release/boost/iostreams/skip.hpp =================================================================== --- boost-release.orig/boost/iostreams/skip.hpp 2009-11-11 23:02:43.000000000 +0000 +++ boost-release/boost/iostreams/skip.hpp 2009-11-11 23:03:06.000000000 +0000 @@ -22,6 +22,7 @@ #include #include #include +#include #include namespace boost { namespace iostreams { @@ -40,7 +41,7 @@ for (stream_offset z = 0; z < off; ) { typename traits_type::int_type c; if (traits_type::is_eof(c = iostreams::get(dev))) - throw BOOST_IOSTREAMS_FAILURE("bad skip offset"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset")); if (!traits_type::would_block(c)) ++z; } @@ -60,7 +61,7 @@ for (stream_offset z = 0; z < off; ) { std::streamsize amt; if ((amt = iostreams::read(flt, dev, &c, 1)) == -1) - throw BOOST_IOSTREAMS_FAILURE("bad skip offset"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset")); if (amt == 1) ++z; }