summaryrefslogtreecommitdiff
path: root/boost/iostreams/detail
diff options
context:
space:
mode:
Diffstat (limited to 'boost/iostreams/detail')
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/access_control.hpp2
-rw-r--r--boost/iostreams/detail/adapter/direct_adapter.hpp2
-rw-r--r--boost/iostreams/detail/adapter/mode_adapter.hpp22
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/adapter/output_iterator_adapter.hpp2
-rw-r--r--boost/iostreams/detail/adapter/range_adapter.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/add_facet.hpp2
-rw-r--r--boost/iostreams/detail/buffer.hpp27
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/call_traits.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/char_traits.hpp2
-rw-r--r--boost/iostreams/detail/codecvt_helper.hpp25
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/codecvt_holder.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/auto_link.hpp4
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/bzip2.hpp4
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/codecvt.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/dyn_link.hpp2
-rw-r--r--boost/iostreams/detail/config/fpos.hpp2
-rw-r--r--boost/iostreams/detail/config/gcc.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/overload_resolution.hpp6
-rw-r--r--boost/iostreams/detail/config/unreachable_return.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/wide_streams.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/zlib.hpp4
-rwxr-xr-xboost/iostreams/detail/counted_array.hpp20
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/default_arg.hpp10
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/dispatch.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/double_object.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/enable_if_stream.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/error.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/execute.hpp2
-rw-r--r--boost/iostreams/detail/forward.hpp43
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/fstream.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/functional.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/ios.hpp5
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/iostream.hpp2
-rw-r--r--boost/iostreams/detail/is_dereferenceable.hpp9
-rw-r--r--boost/iostreams/detail/is_iterator_range.hpp15
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/newline.hpp2
-rw-r--r--boost/iostreams/detail/optional.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/param_type.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/push.hpp5
-rw-r--r--boost/iostreams/detail/push_params.hpp2
-rw-r--r--boost/iostreams/detail/resolve.hpp19
-rw-r--r--boost/iostreams/detail/restrict_impl.hpp3
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/select.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/streambuf.hpp2
-rw-r--r--boost/iostreams/detail/streambuf/chainbuf.hpp5
-rw-r--r--boost/iostreams/detail/streambuf/direct_streambuf.hpp4
-rw-r--r--boost/iostreams/detail/streambuf/indirect_streambuf.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/streambuf/linked_streambuf.hpp2
-rw-r--r--boost/iostreams/detail/system_failure.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/translate_int_type.hpp2
-rwxr-xr-xboost/iostreams/detail/vc6/close.hpp129
-rwxr-xr-xboost/iostreams/detail/vc6/read.hpp238
-rwxr-xr-xboost/iostreams/detail/vc6/write.hpp159
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/wrap_unwrap.hpp31
54 files changed, 115 insertions, 736 deletions
diff --git a/boost/iostreams/detail/access_control.hpp b/boost/iostreams/detail/access_control.hpp
index 2dce6ca8c2..9c3328a226 100755..100644
--- a/boost/iostreams/detail/access_control.hpp
+++ b/boost/iostreams/detail/access_control.hpp
@@ -13,7 +13,7 @@
#ifndef BOOST_IOSTREAMS_ACCESS_CONTROL_HPP_INCLUDED
#define BOOST_IOSTREAMS_ACCESS_CONTROL_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/adapter/direct_adapter.hpp b/boost/iostreams/detail/adapter/direct_adapter.hpp
index 88ab735a17..243b4b0abf 100644
--- a/boost/iostreams/detail/adapter/direct_adapter.hpp
+++ b/boost/iostreams/detail/adapter/direct_adapter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/adapter/mode_adapter.hpp b/boost/iostreams/detail/adapter/mode_adapter.hpp
index 91fd97fbd4..46e83c58af 100644
--- a/boost/iostreams/detail/adapter/mode_adapter.hpp
+++ b/boost/iostreams/detail/adapter/mode_adapter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_MODE_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_MODE_ADAPTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -38,9 +38,7 @@ public:
device_tag,
mpl::if_<is_filter<T>, filter_tag, device_tag>,
mpl::if_<is_filter<T>, multichar_tag, empty_base>,
- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- closable_tag, // VC6 can't see member close()!
- #endif
+ closable_tag,
localizable_tag
{ };
explicit mode_adapter(const component_type& t) : t_(t) { }
@@ -52,10 +50,8 @@ public:
std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
BOOST_IOS::openmode which =
BOOST_IOS::in | BOOST_IOS::out );
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
void close();
void close(BOOST_IOS::openmode which);
-#endif
// Filter member functions.
@@ -108,15 +104,13 @@ std::streampos mode_adapter<Mode, T>::seek
(stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
{ return boost::iostreams::seek(t_, off, way, which); }
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- template<typename Mode, typename T>
- void mode_adapter<Mode, T>::close()
- { detail::close_all(t_); }
+template<typename Mode, typename T>
+void mode_adapter<Mode, T>::close()
+{ detail::close_all(t_); }
- template<typename Mode, typename T>
- void mode_adapter<Mode, T>::close(BOOST_IOS::openmode which)
- { iostreams::close(t_, which); }
-#endif
+template<typename Mode, typename T>
+void mode_adapter<Mode, T>::close(BOOST_IOS::openmode which)
+{ iostreams::close(t_, which); }
} } } // End namespaces detail, iostreams, boost.
diff --git a/boost/iostreams/detail/adapter/output_iterator_adapter.hpp b/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
index 2944f25d75..2ed9039c7b 100755..100644
--- a/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
+++ b/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/adapter/range_adapter.hpp b/boost/iostreams/detail/adapter/range_adapter.hpp
index 4086d31867..b7fe56f7ed 100644
--- a/boost/iostreams/detail/adapter/range_adapter.hpp
+++ b/boost/iostreams/detail/adapter/range_adapter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/add_facet.hpp b/boost/iostreams/detail/add_facet.hpp
index 65a8951444..6033d4f8a1 100755..100644
--- a/boost/iostreams/detail/add_facet.hpp
+++ b/boost/iostreams/detail/add_facet.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/buffer.hpp b/boost/iostreams/detail/buffer.hpp
index 1168289d91..72400f04ca 100644
--- a/boost/iostreams/detail/buffer.hpp
+++ b/boost/iostreams/detail/buffer.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -45,9 +45,9 @@ private:
#endif
public:
basic_buffer();
- basic_buffer(int buffer_size);
+ basic_buffer(std::streamsize buffer_size);
~basic_buffer();
- void resize(int buffer_size);
+ void resize(std::streamsize buffer_size);
Ch* begin() const { return buf_; }
Ch* end() const { return buf_ + size_; }
Ch* data() const { return buf_; }
@@ -83,7 +83,7 @@ public:
using base::data;
using base::size;
typedef Ch* const const_pointer;
- buffer(int buffer_size);
+ buffer(std::streamsize buffer_size);
Ch* & ptr() { return ptr_; }
const_pointer& ptr() const { return ptr_; }
Ch* & eptr() { return eptr_; }
@@ -98,7 +98,11 @@ public:
using namespace std;
std::streamsize keep;
if ((keep = static_cast<std::streamsize>(eptr_ - ptr_)) > 0)
- traits_type::move(this->data(), ptr_, keep);
+ traits_type::move(
+ this->data(),
+ ptr_,
+ static_cast<size_t>(keep)
+ );
set(0, keep);
std::streamsize result =
iostreams::read(src, this->data() + keep, this->size() - keep);
@@ -121,8 +125,8 @@ public:
std::streamsize result = iostreams::write_if(dest, ptr_, amt);
if (result < amt) {
traits_type::move( this->data(),
- ptr_ + result,
- amt - result );
+ ptr_ + static_cast<size_t>(result),
+ static_cast<size_t>(amt - result) );
}
this->set(0, amt - result);
return result != 0;
@@ -141,8 +145,9 @@ template<typename Ch, typename Alloc>
basic_buffer<Ch, Alloc>::basic_buffer() : buf_(0), size_(0) { }
template<typename Ch, typename Alloc>
-basic_buffer<Ch, Alloc>::basic_buffer(int buffer_size)
- : buf_(static_cast<Ch*>(allocator_type().allocate(buffer_size, 0))),
+basic_buffer<Ch, Alloc>::basic_buffer(std::streamsize buffer_size)
+ : buf_(static_cast<Ch*>(allocator_type().allocate(
+ static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(buffer_size), 0))),
size_(buffer_size) // Cast for SunPro 5.3.
{ }
@@ -156,7 +161,7 @@ inline basic_buffer<Ch, Alloc>::~basic_buffer()
}
template<typename Ch, typename Alloc>
-inline void basic_buffer<Ch, Alloc>::resize(int buffer_size)
+inline void basic_buffer<Ch, Alloc>::resize(std::streamsize buffer_size)
{
if (size_ != buffer_size) {
basic_buffer<Ch, Alloc> temp(buffer_size);
@@ -175,7 +180,7 @@ void basic_buffer<Ch, Alloc>::swap(basic_buffer& rhs)
//--------------Implementation of buffer--------------------------------------//
template<typename Ch, typename Alloc>
-buffer<Ch, Alloc>::buffer(int buffer_size)
+buffer<Ch, Alloc>::buffer(std::streamsize buffer_size)
: basic_buffer<Ch, Alloc>(buffer_size) { }
template<typename Ch, typename Alloc>
diff --git a/boost/iostreams/detail/call_traits.hpp b/boost/iostreams/detail/call_traits.hpp
index 6b04c7a656..be6123737b 100755..100644
--- a/boost/iostreams/detail/call_traits.hpp
+++ b/boost/iostreams/detail/call_traits.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_VALUE_TYPE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_VALUE_TYPE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/char_traits.hpp b/boost/iostreams/detail/char_traits.hpp
index 2ee2fd0d4f..ce3eb6dbe7 100755..100644
--- a/boost/iostreams/detail/char_traits.hpp
+++ b/boost/iostreams/detail/char_traits.hpp
@@ -12,7 +12,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CHAR_TRAITS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CHAR_TRAITS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/codecvt_helper.hpp b/boost/iostreams/detail/codecvt_helper.hpp
index deb4e30683..0bd8d598ea 100644
--- a/boost/iostreams/detail/codecvt_helper.hpp
+++ b/boost/iostreams/detail/codecvt_helper.hpp
@@ -28,7 +28,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -162,7 +162,6 @@ protected:
#if defined(BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION) || \
defined(BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION) \
/**/
-# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# define BOOST_IOSTREAMS_CODECVT_SPEC(state) \
namespace std { \
template<typename Intern, typename Extern> \
@@ -183,28 +182,6 @@ protected:
std::locale::id codecvt<Intern, Extern, state>::id; \
} \
/**/
-# else
-# define BOOST_IOSTREAMS_CODECVT_SPEC(state) \
- namespace std { \
- template<> \
- class codecvt<wchar_t, char, state> \
- : public ::boost::iostreams::detail::codecvt_impl< \
- wchar_t, char, state \
- > \
- { \
- public: \
- codecvt(std::size_t refs = 0) \
- : ::boost::iostreams::detail::codecvt_impl< \
- wchar_t, char, state \
- >(refs) \
- { } \
- static std::locale::id id; \
- }; \
- template<> \
- std::locale::id codecvt<wchar_t, char, state>::id; \
- } \
- /**/
-# endif
#else
# define BOOST_IOSTREAMS_CODECVT_SPEC(state)
#endif // no primary codecvt definition, or empty definition.
diff --git a/boost/iostreams/detail/codecvt_holder.hpp b/boost/iostreams/detail/codecvt_holder.hpp
index 6d6e1cf179..13a93334eb 100755..100644
--- a/boost/iostreams/detail/codecvt_holder.hpp
+++ b/boost/iostreams/detail/codecvt_holder.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/auto_link.hpp b/boost/iostreams/detail/config/auto_link.hpp
index 55f954b64f..07ab23c3c1 100755..100644
--- a/boost/iostreams/detail/config/auto_link.hpp
+++ b/boost/iostreams/detail/config/auto_link.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -19,7 +19,7 @@
# if defined(BOOST_MSVC) \
|| defined(__BORLANDC__) \
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
- || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ || (defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/
# pragma comment(lib, BOOST_EXTERNAL_LIB_NAME)
# endif
diff --git a/boost/iostreams/detail/config/bzip2.hpp b/boost/iostreams/detail/config/bzip2.hpp
index d716fd169c..bfcda40560 100755..100644
--- a/boost/iostreams/detail/config/bzip2.hpp
+++ b/boost/iostreams/detail/config/bzip2.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -19,7 +19,7 @@
# if defined(BOOST_MSVC) || \
defined(__BORLANDC__) || \
(defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \
- (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ (defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/
// Specify the name of the .lib file.
diff --git a/boost/iostreams/detail/config/codecvt.hpp b/boost/iostreams/detail/config/codecvt.hpp
index 7c6cb1f385..b525c8435b 100755..100644
--- a/boost/iostreams/detail/config/codecvt.hpp
+++ b/boost/iostreams/detail/config/codecvt.hpp
@@ -13,7 +13,7 @@
#include <boost/iostreams/detail/config/wide_streams.hpp>
#include <cstddef>
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/dyn_link.hpp b/boost/iostreams/detail/config/dyn_link.hpp
index 518e0b03ce..15490cfe4d 100755..100644
--- a/boost/iostreams/detail/config/dyn_link.hpp
+++ b/boost/iostreams/detail/config/dyn_link.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/fpos.hpp b/boost/iostreams/detail/config/fpos.hpp
index 811a8d66f6..d1ba7dddcb 100644
--- a/boost/iostreams/detail/config/fpos.hpp
+++ b/boost/iostreams/detail/config/fpos.hpp
@@ -18,7 +18,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/gcc.hpp b/boost/iostreams/detail/config/gcc.hpp
index a1d57b081f..ff6892a5e5 100644
--- a/boost/iostreams/detail/config/gcc.hpp
+++ b/boost/iostreams/detail/config/gcc.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/overload_resolution.hpp b/boost/iostreams/detail/config/overload_resolution.hpp
index bbdd442788..63d9e2830d 100755..100644
--- a/boost/iostreams/detail/config/overload_resolution.hpp
+++ b/boost/iostreams/detail/config/overload_resolution.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -21,9 +21,7 @@
#if !defined(BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION)
# if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) || \
- BOOST_WORKAROUND(__BORLANDC__, < 0x600) || \
- BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
- BOOST_WORKAROUND(BOOST_IOSTREAMS_GCC, <= 295) \
+ BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
/**/
# define BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION
# endif
diff --git a/boost/iostreams/detail/config/unreachable_return.hpp b/boost/iostreams/detail/config/unreachable_return.hpp
index 9e40033e8d..97b3709952 100644
--- a/boost/iostreams/detail/config/unreachable_return.hpp
+++ b/boost/iostreams/detail/config/unreachable_return.hpp
@@ -7,7 +7,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/wide_streams.hpp b/boost/iostreams/detail/config/wide_streams.hpp
index 425875e1f8..af3d716d49 100755..100644
--- a/boost/iostreams/detail/config/wide_streams.hpp
+++ b/boost/iostreams/detail/config/wide_streams.hpp
@@ -15,7 +15,7 @@
#include <boost/detail/workaround.hpp>
#include <cstddef>
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/zlib.hpp b/boost/iostreams/detail/config/zlib.hpp
index 9283e4caa9..017dd0c182 100755..100644
--- a/boost/iostreams/detail/config/zlib.hpp
+++ b/boost/iostreams/detail/config/zlib.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -21,7 +21,7 @@
# if defined(BOOST_MSVC) || \
defined(__BORLANDC__) || \
(defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \
- (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ (defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/
// Specify the name of the .lib file.
diff --git a/boost/iostreams/detail/counted_array.hpp b/boost/iostreams/detail/counted_array.hpp
index d37193e7ab..c0cd8a1765 100755
--- a/boost/iostreams/detail/counted_array.hpp
+++ b/boost/iostreams/detail/counted_array.hpp
@@ -9,6 +9,8 @@
#define BOOST_IOSTREAMS_DETAIL_COUNTED_ARRAY_HPP_INCLUDED
#include <algorithm> // min.
+#include <cstddef> // size_t
+#include <string> // char_traits
#include <boost/iostreams/categories.hpp>
#include <boost/iostreams/detail/char_traits.hpp>
#include <boost/iostreams/detail/ios.hpp> // streamsize.
@@ -25,9 +27,13 @@ public:
{ }
std::streamsize read(Ch* s, std::streamsize n)
{
- std::streamsize result = (std::min)(n, end_ - ptr_);
- BOOST_IOSTREAMS_CHAR_TRAITS(char_type)::copy
- (s, buf_ + ptr_, result);
+ using namespace std;
+ streamsize result = (std::min)(n, end_ - ptr_);
+ char_traits<char_type>::copy(
+ s,
+ buf_ + ptr_,
+ static_cast<size_t>(result)
+ );
ptr_ += result;
return result;
}
@@ -47,9 +53,13 @@ public:
{ }
std::streamsize write(const Ch* s, std::streamsize n)
{
+ using namespace std;
std::streamsize result = (std::min)(n, end_ - ptr_);
- BOOST_IOSTREAMS_CHAR_TRAITS(char_type)::copy
- (buf_ + ptr_, s, result);
+ char_traits<char_type>::copy(
+ buf_ + ptr_,
+ s,
+ static_cast<size_t>(result)
+ );
ptr_ += result;
return result;
}
diff --git a/boost/iostreams/detail/default_arg.hpp b/boost/iostreams/detail/default_arg.hpp
index 9364ca27fa..c443e9872a 100755..100644
--- a/boost/iostreams/detail/default_arg.hpp
+++ b/boost/iostreams/detail/default_arg.hpp
@@ -8,18 +8,14 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# include <boost/mpl/identity.hpp>
-# define BOOST_IOSTREAMS_DEFAULT_ARG(arg) mpl::identity< arg >::type
-#else
-# define BOOST_IOSTREAMS_DEFAULT_ARG(arg) arg
-#endif
+// Obsolete. Remove.
+#define BOOST_IOSTREAMS_DEFAULT_ARG(arg) arg
#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED
diff --git a/boost/iostreams/detail/dispatch.hpp b/boost/iostreams/detail/dispatch.hpp
index b482e04319..35cf244141 100755..100644
--- a/boost/iostreams/detail/dispatch.hpp
+++ b/boost/iostreams/detail/dispatch.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/double_object.hpp b/boost/iostreams/detail/double_object.hpp
index 69f6587753..efb3b78601 100755..100644
--- a/boost/iostreams/detail/double_object.hpp
+++ b/boost/iostreams/detail/double_object.hpp
@@ -14,7 +14,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DOUBLE_OBJECT_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DOUBLE_OBJECT_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/enable_if_stream.hpp b/boost/iostreams/detail/enable_if_stream.hpp
index 2cdd7068cb..826e44d2a5 100755..100644
--- a/boost/iostreams/detail/enable_if_stream.hpp
+++ b/boost/iostreams/detail/enable_if_stream.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_ENABLE_IF_STREAM_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_ENABLE_IF_STREAM_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/error.hpp b/boost/iostreams/detail/error.hpp
index 57999d4ef5..85cbd98fe2 100755..100644
--- a/boost/iostreams/detail/error.hpp
+++ b/boost/iostreams/detail/error.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/execute.hpp b/boost/iostreams/detail/execute.hpp
index 14d1a48f80..28e4217234 100755..100644
--- a/boost/iostreams/detail/execute.hpp
+++ b/boost/iostreams/detail/execute.hpp
@@ -28,7 +28,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_EXECUTE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_EXECUTE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/forward.hpp b/boost/iostreams/detail/forward.hpp
index 0ff2a35a98..f5ed4f85dc 100644
--- a/boost/iostreams/detail/forward.hpp
+++ b/boost/iostreams/detail/forward.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_FORWARD_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_FORWARD_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -62,8 +62,14 @@
BOOST_IOSTREAMS_FORWARDING_FN, (class, impl, device) \
) \
/**/
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# define BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple) \
+#define BOOST_IOSTREAMS_FORWARDING_CTOR(z, n, tuple) \
+ template<BOOST_PP_ENUM_PARAMS_Z(z, n, typename U)> \
+ BOOST_PP_TUPLE_ELEM(3, 0, tuple) \
+ (BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \
+ BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \
+ { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \
+ ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \
+ (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \
template< typename U100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \
BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), typename U) > \
BOOST_PP_TUPLE_ELEM(3, 0, tuple) \
@@ -75,7 +81,13 @@
( u100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \
BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), u)) ); } \
/**/
-# define BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple) \
+#define BOOST_IOSTREAMS_FORWARDING_FN(z, n, tuple) \
+ template<BOOST_PP_ENUM_PARAMS_Z(z, n, typename U)> \
+ void open(BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \
+ BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \
+ { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \
+ ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \
+ (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \
template< typename U100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \
BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), typename U) > \
void open \
@@ -86,29 +98,6 @@
( u100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \
BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), u) ); } \
/**/
-#else
-# define BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple)
-# define BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple)
-#endif
-#define BOOST_IOSTREAMS_FORWARDING_CTOR(z, n, tuple) \
- template<BOOST_PP_ENUM_PARAMS_Z(z, n, typename U)> \
- BOOST_PP_TUPLE_ELEM(3, 0, tuple) \
- (BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \
- BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \
- { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \
- ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \
- (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \
- BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple) \
- /**/
-#define BOOST_IOSTREAMS_FORWARDING_FN(z, n, tuple) \
- template<BOOST_PP_ENUM_PARAMS_Z(z, n, typename U)> \
- void open(BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \
- BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \
- { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \
- ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \
- (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \
- BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple) \
- /**/
// Disable forwarding constructors if first parameter type is the same
// as the device type
diff --git a/boost/iostreams/detail/fstream.hpp b/boost/iostreams/detail/fstream.hpp
index b8070a7291..848258d97c 100755..100644
--- a/boost/iostreams/detail/fstream.hpp
+++ b/boost/iostreams/detail/fstream.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_FSTREAM_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_FSTREAM_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/functional.hpp b/boost/iostreams/detail/functional.hpp
index a7b9b6bbb1..97b7fe5e75 100755..100644
--- a/boost/iostreams/detail/functional.hpp
+++ b/boost/iostreams/detail/functional.hpp
@@ -17,7 +17,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_FUNCTIONAL_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_FUNCTIONAL_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/ios.hpp b/boost/iostreams/detail/ios.hpp
index 4d34f8fdb0..b123ddeb58 100755..100644
--- a/boost/iostreams/detail/ios.hpp
+++ b/boost/iostreams/detail/ios.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -32,8 +32,7 @@ namespace boost { namespace iostreams { namespace detail {
#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------//
# define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::basic_ios< ch, tr >
# if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) && \
- !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
+ !BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
/**/
#define BOOST_IOS std::ios
diff --git a/boost/iostreams/detail/iostream.hpp b/boost/iostreams/detail/iostream.hpp
index 45692b35a0..1e19f08278 100755..100644
--- a/boost/iostreams/detail/iostream.hpp
+++ b/boost/iostreams/detail/iostream.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_IOSTREAM_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_IOSTREAM_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/is_dereferenceable.hpp b/boost/iostreams/detail/is_dereferenceable.hpp
index 8b86819979..06744abbdf 100644
--- a/boost/iostreams/detail/is_dereferenceable.hpp
+++ b/boost/iostreams/detail/is_dereferenceable.hpp
@@ -9,8 +9,6 @@
#ifndef BOOST_IOSTREAMS_DETAIL_IS_DEREFERENCEABLE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_IS_DEREFERENCEABLE_HPP_INCLUDED
-# include <boost/type_traits/detail/bool_trait_def.hpp>
-# include <boost/type_traits/detail/template_arity_spec.hpp>
# include <boost/type_traits/remove_cv.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
# include <boost/mpl/bool.hpp>
@@ -39,8 +37,7 @@ namespace is_dereferenceable_
// This is a last-resort operator* for when none other is found
tag operator*(any const&);
-# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \
- || BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
# define BOOST_comma(a,b) (a)
# else
// In case an operator++ is found that returns void, we'll use ++x,0
@@ -70,15 +67,13 @@ namespace is_dereferenceable_
template<typename T>
struct is_dereferenceable
- BOOST_TT_AUX_BOOL_C_BASE(is_dereferenceable_::impl<T>::value)
+ : public ::boost::integral_constant<bool, is_dereferenceable_::impl<T>::value >
{
- BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(is_dereferenceable_::impl<T>::value)
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_dereferenceable,(T))
};
} }
-BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::iostreams::detail::is_dereferenceable)
} // End namespaces detail, iostreams, boost.
diff --git a/boost/iostreams/detail/is_iterator_range.hpp b/boost/iostreams/detail/is_iterator_range.hpp
index ac61064022..39d845f4a3 100644
--- a/boost/iostreams/detail/is_iterator_range.hpp
+++ b/boost/iostreams/detail/is_iterator_range.hpp
@@ -17,8 +17,6 @@
namespace boost {
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
-
// We avoid dependence on Boost.Range by using a forward declaration.
template<typename Iterator>
class iterator_range;
@@ -29,19 +27,6 @@ BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_iterator_range, boost::iterator_range, 1)
} // End namespace iostreams.
-# else // # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //-----------------------//
-
-namespace iostreams {
-
- template<typename T>
- struct is_iterator_range {
- BOOST_STATIC_CONSTANT(bool, value = false);
- };
-
-} // End namespace iostreams.
-
-# endif // # if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) //----------------------//
-
} // End namespace boost.
#include <boost/iostreams/detail/config/enable_warnings.hpp>
diff --git a/boost/iostreams/detail/newline.hpp b/boost/iostreams/detail/newline.hpp
index 41b5b5268d..d6fceb04b0 100755..100644
--- a/boost/iostreams/detail/newline.hpp
+++ b/boost/iostreams/detail/newline.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/optional.hpp b/boost/iostreams/detail/optional.hpp
index dbb25f0040..867dfbda69 100644
--- a/boost/iostreams/detail/optional.hpp
+++ b/boost/iostreams/detail/optional.hpp
@@ -14,7 +14,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_OPTIONAL_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_OPTIONAL_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/param_type.hpp b/boost/iostreams/detail/param_type.hpp
index c10f1d8bb2..3a9949348c 100755..100644
--- a/boost/iostreams/detail/param_type.hpp
+++ b/boost/iostreams/detail/param_type.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/push.hpp b/boost/iostreams/detail/push.hpp
index c1e7d9aa5e..1a9393cb02 100755..100644
--- a/boost/iostreams/detail/push.hpp
+++ b/boost/iostreams/detail/push.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_PUSH_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_PUSH_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -53,8 +53,7 @@
BOOST_IOSTREAMS_PUSH_ARGS() ); \
/**/
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
- !BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
/**/
# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
# define BOOST_IOSTREAMS_DEFINE_PUSH_IMPL(name, mode, ch, helper, has_return, result) \
diff --git a/boost/iostreams/detail/push_params.hpp b/boost/iostreams/detail/push_params.hpp
index 7e80d09af1..8d8e5d74b3 100644
--- a/boost/iostreams/detail/push_params.hpp
+++ b/boost/iostreams/detail/push_params.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_PUSH_PARAMS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_PUSH_PARAMS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/resolve.hpp b/boost/iostreams/detail/resolve.hpp
index fd1fbb6522..2d480950e1 100644
--- a/boost/iostreams/detail/resolve.hpp
+++ b/boost/iostreams/detail/resolve.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -32,9 +32,7 @@
#include <boost/mpl/and.hpp>
#include <boost/mpl/bool.hpp> // true_.
#include <boost/mpl/if.hpp>
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-# include <boost/range/iterator_range.hpp>
-#endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+#include <boost/range/iterator_range.hpp>
#include <boost/type_traits/is_array.hpp>
// Must come last.
@@ -102,12 +100,10 @@ template<typename Mode, typename Ch, std::size_t N>
array_adapter<Mode, Ch> resolve(Ch (&array)[N])
{ return array_adapter<Mode, Ch>(array); }
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
- template<typename Mode, typename Ch, typename Iter>
- range_adapter< Mode, boost::iterator_range<Iter> >
- resolve(const boost::iterator_range<Iter>& rng)
- { return range_adapter< Mode, boost::iterator_range<Iter> >(rng); }
-# endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+template<typename Mode, typename Ch, typename Iter>
+range_adapter< Mode, boost::iterator_range<Iter> >
+resolve(const boost::iterator_range<Iter>& rng)
+{ return range_adapter< Mode, boost::iterator_range<Iter> >(rng); }
# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //---------------------//
@@ -201,7 +197,6 @@ resolve(const T& t BOOST_IOSTREAMS_DISABLE_IF_STREAM(T))
{ return resolve<Mode, Ch>(t, is_std_io<T>()); }
# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
!defined(__GNUC__) // ---------------------------------------------------//
template<typename Mode, typename Ch, typename T>
@@ -225,7 +220,7 @@ typename resolve_traits<Mode, Ch, T>::type
resolve(T& t BOOST_IOSTREAMS_ENABLE_IF_STREAM(T))
{ return resolve<Mode, Ch>(t, is_std_io<T>()); }
-# endif // Borland 5.x, VC6-7.0 or GCC 2.9x //--------------------------------//
+# endif // Borland 5.x or GCC //--------------------------------//
#endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------//
} } } // End namespaces detail, iostreams, boost.
diff --git a/boost/iostreams/detail/restrict_impl.hpp b/boost/iostreams/detail/restrict_impl.hpp
index aab9411462..8278db5a6a 100644
--- a/boost/iostreams/detail/restrict_impl.hpp
+++ b/boost/iostreams/detail/restrict_impl.hpp
@@ -466,7 +466,6 @@ BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
{ return BOOST_IOSTREAMS_RESTRICT(t, off, len, is_std_io<T>()); }
# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
!defined(__GNUC__) // ---------------------------------------------------//
template<typename T>
@@ -474,7 +473,7 @@ restriction<T>
BOOST_IOSTREAMS_RESTRICT(T& t, stream_offset off, stream_offset len = -1)
{ return restriction<T>(t, off, len); }
-# endif // Borland 5.x, VC6-7.0 or GCC 2.9x //-------------------------------//
+# endif // Borland 5.x or GCC //-------------------------------//
# endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //--------------//
} } // End namespaces iostreams, boost.
diff --git a/boost/iostreams/detail/select.hpp b/boost/iostreams/detail/select.hpp
index bfe1d09dea..16c5973ad1 100755..100644
--- a/boost/iostreams/detail/select.hpp
+++ b/boost/iostreams/detail/select.hpp
@@ -25,7 +25,7 @@
#ifndef BOOST_IOSTREAMS_SELECT_HPP_INCLUDED
#define BOOST_IOSTREAMS_SELECT_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/streambuf.hpp b/boost/iostreams/detail/streambuf.hpp
index 49a48ce38f..f2e8081b20 100755..100644
--- a/boost/iostreams/detail/streambuf.hpp
+++ b/boost/iostreams/detail/streambuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_STREAMBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_STREAMBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/streambuf/chainbuf.hpp b/boost/iostreams/detail/streambuf/chainbuf.hpp
index 4e14383843..c3714fe041 100644
--- a/boost/iostreams/detail/streambuf/chainbuf.hpp
+++ b/boost/iostreams/detail/streambuf/chainbuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CHAINBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CHAINBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -75,9 +75,6 @@ protected:
typename Chain::char_type,
typename Chain::traits_type
) base_type;
-//#if !BOOST_WORKAROUND(__GNUC__, == 2)
-// BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
-//#endif
private:
// Translate from std int_type to chain's int_type.
diff --git a/boost/iostreams/detail/streambuf/direct_streambuf.hpp b/boost/iostreams/detail/streambuf/direct_streambuf.hpp
index 46e5444b28..69efe2b128 100644
--- a/boost/iostreams/detail/streambuf/direct_streambuf.hpp
+++ b/boost/iostreams/detail/streambuf/direct_streambuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -67,9 +67,7 @@ public: // stream needs access.
// Declared in linked_streambuf.
T* component() { return storage_.get(); }
protected:
-#if !BOOST_WORKAROUND(__GNUC__, == 2)
BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
-#endif
direct_streambuf();
//--------------Virtual functions-----------------------------------------//
diff --git a/boost/iostreams/detail/streambuf/indirect_streambuf.hpp b/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
index 42a3c97959..8da5ef3c50 100644
--- a/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
+++ b/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
@@ -73,9 +73,7 @@ public:
// Declared in linked_streambuf.
T* component() { return &*obj(); }
protected:
-#if !BOOST_WORKAROUND(__GNUC__, == 2)
BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
-#endif
//----------virtual functions---------------------------------------------//
diff --git a/boost/iostreams/detail/streambuf/linked_streambuf.hpp b/boost/iostreams/detail/streambuf/linked_streambuf.hpp
index 10aedb89df..9999ded62f 100755..100644
--- a/boost/iostreams/detail/streambuf/linked_streambuf.hpp
+++ b/boost/iostreams/detail/streambuf/linked_streambuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/system_failure.hpp b/boost/iostreams/detail/system_failure.hpp
index 7d86eafec4..10b291a516 100644
--- a/boost/iostreams/detail/system_failure.hpp
+++ b/boost/iostreams/detail/system_failure.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/translate_int_type.hpp b/boost/iostreams/detail/translate_int_type.hpp
index 88b9341f74..ae48a2c46f 100755..100644
--- a/boost/iostreams/detail/translate_int_type.hpp
+++ b/boost/iostreams/detail/translate_int_type.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_TRANSLATE_INT_TYPE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_TRANSLATE_INT_TYPE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/vc6/close.hpp b/boost/iostreams/detail/vc6/close.hpp
deleted file mode 100755
index f8936742b7..0000000000
--- a/boost/iostreams/detail/vc6/close.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename T>
-struct close_impl;
-
-} // End namespace detail.
-
-template<typename T>
-void close(T& t) { detail::close_all(t); }
-
-template<typename T>
-void close(T& t, BOOST_IOS::openmode which)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- detail::close_impl<T>::inner<unwrapped>::close(detail::unwrap(t), which);
-}
-
-template<typename T, typename Sink>
-void close(T& t, Sink& snk, BOOST_IOS::openmode which)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- detail::close_impl<T>::inner<unwrapped>::close(detail::unwrap(t), snk, which);
-}
-
-namespace detail {
-
-//------------------Definition of close_impl----------------------------------//
-
-template<typename T>
-struct close_tag {
- typedef typename category_of<T>::type category;
- typedef typename
- mpl::eval_if<
- is_convertible<category, closable_tag>,
- mpl::if_<
- mpl::or_<
- is_convertible<category, two_sequence>,
- is_convertible<category, dual_use>
- >,
- two_sequence,
- closable_tag
- >,
- mpl::identity<any_tag>
- >::type type;
-};
-
-template<typename T>
-struct close_impl
- : mpl::if_<
- is_custom<T>,
- operations<T>,
- close_impl<BOOST_DEDUCED_TYPENAME close_tag<T>::type>
- >::type
- { };
-
-template<>
-struct close_impl<any_tag> {
- template<typename T>
- struct inner {
- static void close(T& t, BOOST_IOS::openmode which)
- {
- if (which == BOOST_IOS::out)
- iostreams::flush(t);
- }
-
- template<typename Sink>
- static void close(T& t, Sink& snk, BOOST_IOS::openmode which)
- {
- if (which == BOOST_IOS::out) {
- non_blocking_adapter<Sink> nb(snk);
- iostreams::flush(t, nb);
- }
- }
- };
-};
-
-template<>
-struct close_impl<closable_tag> {
- template<typename T>
- struct inner {
- static void close(T& t, BOOST_IOS::openmode which)
- {
- typedef typename category_of<T>::type category;
- const bool in = is_convertible<category, input>::value &&
- !is_convertible<category, output>::value;
- if (in == (which == BOOST_IOS::in))
- t.close();
- }
- template<typename Sink>
- static void close(T& t, Sink& snk, BOOST_IOS::openmode which)
- {
- typedef typename category_of<T>::type category;
- const bool in = is_convertible<category, input>::value &&
- !is_convertible<category, output>::value;
- if (in == (which == BOOST_IOS::in)) {
- non_blocking_adapter<Sink> nb(snk);
- t.close(nb);
- }
- }
- };
-};
-
-template<>
-struct close_impl<two_sequence> {
- template<typename T>
- struct inner {
- static void close(T& t, BOOST_IOS::openmode which) { t.close(which); }
-
- template<typename Sink>
- static void close(T& t, Sink& snk, BOOST_IOS::openmode which)
- {
- non_blocking_adapter<Sink> nb(snk);
- t.close(nb, which);
- }
- };
-};
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
diff --git a/boost/iostreams/detail/vc6/read.hpp b/boost/iostreams/detail/vc6/read.hpp
deleted file mode 100755
index 1e01f665b9..0000000000
--- a/boost/iostreams/detail/vc6/read.hpp
+++ /dev/null
@@ -1,238 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename T>
-struct read_device_impl;
-
-template<typename T>
-struct read_filter_impl;
-
-} // End namespace detail.
-
-template<typename T>
-typename int_type_of<T>::type get(T& t)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::read_device_impl<T>::inner<unwrapped>::get(detail::unwrap(t));
-}
-
-template<typename T>
-inline std::streamsize
-read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::read_device_impl<T>::inner<unwrapped>::read(detail::unwrap(t), s, n);
-}
-
-template<typename T, typename Source>
-std::streamsize
-read(T& t, Source& src, typename char_type_of<T>::type* s, std::streamsize n)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::read_filter_impl<T>::inner<unwrapped>::read(detail::unwrap(t), src, s, n);
-}
-
-template<typename T>
-bool putback(T& t, typename char_type_of<T>::type c)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::read_device_impl<T>::inner<unwrapped>::putback(detail::unwrap(t), c);
-}
-
-//----------------------------------------------------------------------------//
-
-namespace detail {
-
-// Helper function for adding -1 as EOF indicator.
-inline std::streamsize check_eof(std::streamsize n) { return n != 0 ? n : -1; }
-
-// Helper templates for reading from streambufs.
-template<bool IsLinked>
-struct true_eof_impl;
-
-template<>
-struct true_eof_impl<true> {
- template<typename T>
- static bool true_eof(T& t) { return t.true_eof(); }
-};
-
-template<>
-struct true_eof_impl<false> {
- template<typename T>
- static bool true_eof(T& t) { return true; }
-};
-
-template<typename T>
-inline bool true_eof(T& t)
-{
- const bool linked = is_linked<T>::value;
- return true_eof_impl<linked>::true_eof(t);
-}
-
-//------------------Definition of read_device_impl----------------------------//
-
-template<typename T>
-struct read_device_impl
- : mpl::if_<
- detail::is_custom<T>,
- operations<T>,
- read_device_impl<
- BOOST_DEDUCED_TYPENAME
- detail::dispatch<
- T, istream_tag, streambuf_tag, input
- >::type
- >
- >::type
- { };
-
-template<>
-struct read_device_impl<istream_tag> {
- template<typename T>
- struct inner {
- static typename int_type_of<T>::type get(T& t)
- { return t.get(); }
-
- static std::streamsize
- read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
- { return check_eof(t.rdbuf()->sgetn(s, n)); }
-
- static bool putback(T& t, typename char_type_of<T>::type c)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type;
- return !traits_type::eq_int_type( t.rdbuf()->sputbackc(c),
- traits_type::eof() );
- }
- };
-};
-
-template<>
-struct read_device_impl<streambuf_tag> {
- template<typename T>
- struct inner {
- static typename int_type_of<T>::type
- get(T& t)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef char_traits<char_type> traits_type;
- typename int_type_of<T>::type c;
- return !traits_type::is_eof(c = t.sbumpc()) ||
- detail::true_eof(t)
- ?
- c : traits_type::would_block();
- }
-
- static std::streamsize
- read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
- {
- std::streamsize amt;
- return (amt = t.sgetn(s, n)) != 0 ?
- amt :
- detail::true_eof(t) ?
- -1 :
- 0;
- }
-
- static bool putback(T& t, typename char_type_of<T>::type c)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef char_traits<char_type> traits_type;
- return !traits_type::is_eof(t.sputbackc(c));
- }
- };
-};
-
-template<>
-struct read_device_impl<input> {
- template<typename T>
- struct inner {
- static typename int_type_of<T>::type
- get(T& t)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef char_traits<char_type> traits_type;
- char_type c;
- std::streamsize amt;
- return (amt = t.read(&c, 1)) == 1 ?
- traits_type::to_int_type(c) :
- amt == -1 ?
- traits_type::eof() :
- traits_type::would_block();
- }
-
- template<typename T>
- static std::streamsize
- read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
- { return t.read(s, n); }
-
- template<typename T>
- static bool putback(T& t, typename char_type_of<T>::type c)
- { // T must be Peekable.
- return t.putback(c);
- }
- };
-};
-
-//------------------Definition of read_filter_impl----------------------------//
-
-template<typename T>
-struct read_filter_impl
- : mpl::if_<
- detail::is_custom<T>,
- operations<T>,
- read_filter_impl<
- BOOST_DEDUCED_TYPENAME
- detail::dispatch<
- T, multichar_tag, any_tag
- >::type
- >
- >::type
- { };
-
-template<>
-struct read_filter_impl<multichar_tag> {
- template<typename T>
- struct inner {
- template<typename Source>
- static std::streamsize read
- ( T& t, Source& src, typename char_type_of<T>::type* s,
- std::streamsize n )
- { return t.read(src, s, n); }
- };
-};
-
-template<>
-struct read_filter_impl<any_tag> {
- template<typename T>
- struct inner {
- template<typename Source>
- static std::streamsize read
- ( T& t, Source& src, typename char_type_of<T>::type* s,
- std::streamsize n )
- {
- typedef typename char_type_of<T>::type char_type;
- typedef char_traits<char_type> traits_type;
- for (std::streamsize off = 0; off < n; ++off) {
- typename traits_type::int_type c = t.get(src);
- if (traits_type::is_eof(c))
- return check_eof(off);
- if (traits_type::would_block(c))
- return off;
- s[off] = traits_type::to_char_type(c);
- }
- return n;
- }
- };
-};
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
diff --git a/boost/iostreams/detail/vc6/write.hpp b/boost/iostreams/detail/vc6/write.hpp
deleted file mode 100755
index ee8b9488ff..0000000000
--- a/boost/iostreams/detail/vc6/write.hpp
+++ /dev/null
@@ -1,159 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename T>
-struct write_device_impl;
-
-template<typename T>
-struct write_filter_impl;
-
-} // End namespace detail.
-
-template<typename T>
-bool put(T& t, typename char_type_of<T>::type c)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::write_device_impl<T>::inner<unwrapped>::put(detail::unwrap(t), c);
-}
-
-template<typename T>
-inline std::streamsize write
- (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::write_device_impl<T>::inner<unwrapped>::write(detail::unwrap(t), s, n);
-}
-
-template<typename T, typename Sink>
-inline std::streamsize
-write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
- std::streamsize n )
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::write_filter_impl<T>::inner<unwrapped>::write(detail::unwrap(t), snk, s, n);
-}
-
-namespace detail {
-
-//------------------Definition of write_device_impl---------------------------//
-
-template<typename T>
-struct write_device_impl
- : mpl::if_<
- is_custom<T>,
- operations<T>,
- write_device_impl<
- BOOST_DEDUCED_TYPENAME
- dispatch<
- T, ostream_tag, streambuf_tag, output
- >::type
- >
- >::type
- { };
-
-template<>
-struct write_device_impl<ostream_tag> {
- template<typename T>
- struct inner {
- static bool put(T& t, typename char_type_of<T>::type c)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type;
- return !traits_type::eq_int_type( t.rdbuf()->s.sputc(),
- traits_type::eof() );
- }
-
- static std::streamsize write
- (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
- { return t.rdbuf()->sputn(s, n); }
- };
-};
-
-template<>
-struct write_device_impl<streambuf_tag> {
- template<typename T>
- struct inner {
- static bool put(T& t, typename char_type_of<T>::type c)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type;
- return !traits_type::eq_int_type(t.sputc(c), traits_type::eof());
- }
-
- template<typename T>
- static std::streamsize write
- (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
- { return t.sputn(s, n); }
- };
-};
-
-template<>
-struct write_device_impl<output> {
- template<typename T>
- struct inner {
- static bool put(T& t, typename char_type_of<T>::type c)
- { return t.write(&c, 1) == 1; }
-
- template<typename T>
- static std::streamsize
- write(T& t, const typename char_type_of<T>::type* s, std::streamsize n)
- { return t.write(s, n); }
- };
-};
-
-//------------------Definition of write_filter_impl---------------------------//
-
-template<typename T>
-struct write_filter_impl
- : mpl::if_<
- is_custom<T>,
- operations<T>,
- write_filter_impl<
- BOOST_DEDUCED_TYPENAME
- dispatch<
- T, multichar_tag, any_tag
- >::type
- >
- >::type
- { };
-
-template<>
-struct write_filter_impl<multichar_tag> {
- template<typename T>
- struct inner {
- template<typename Sink>
- static std::streamsize
- write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
- std::streamsize n )
- { return t.write(snk, s, n); }
- };
-};
-
-template<>
-struct write_filter_impl<any_tag> {
- template<typename T>
- struct inner {
- template<typename Sink>
- static std::streamsize
- write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
- std::streamsize n )
- {
- for (std::streamsize off = 0; off < n; ++off)
- if (!t.put(snk, s[off]))
- return off;
- return n;
- }
- };
-};
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
diff --git a/boost/iostreams/detail/wrap_unwrap.hpp b/boost/iostreams/detail/wrap_unwrap.hpp
index 6e3d231422..f5f97897f9 100755..100644
--- a/boost/iostreams/detail/wrap_unwrap.hpp
+++ b/boost/iostreams/detail/wrap_unwrap.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -83,8 +83,6 @@ struct unwrap_ios
//------------------Definition of unwrap--------------------------------------//
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //----------------------------------//
-
template<typename T>
typename unwrapped_type<T>::type&
unwrap(const reference_wrapper<T>& ref) { return ref.get(); }
@@ -95,33 +93,6 @@ typename unwrapped_type<T>::type& unwrap(T& t) { return t; }
template<typename T>
const typename unwrapped_type<T>::type& unwrap(const T& t) { return t; }
-#else // #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //-------------------------//
-
-// Since unwrap is a potential bottleneck, we avoid runtime tag dispatch.
-template<bool IsRefWrap>
-struct unwrap_impl;
-
-template<>
-struct unwrap_impl<true> {
- template<typename T>
- static typename unwrapped_type<T>::type& unwrap(const T& t)
- { return t.get(); }
-};
-
-template<>
-struct unwrap_impl<false> {
- template<typename T>
- static typename unwrapped_type<T>::type& unwrap(const T& t)
- { return const_cast<T&>(t); }
-};
-
-template<typename T>
-typename unwrapped_type<T>::type&
-unwrap(const T& t)
-{ return unwrap_impl<is_reference_wrapper<T>::value>::unwrap(t); }
-
-#endif // #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //------------------------//
-
} } } // End namespaces detail, iostreams, boost.
#endif // #ifndef BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED