summaryrefslogtreecommitdiff
path: root/boost/iostreams/filter/zlib.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/iostreams/filter/zlib.hpp')
-rw-r--r--boost/iostreams/filter/zlib.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/boost/iostreams/filter/zlib.hpp b/boost/iostreams/filter/zlib.hpp
index 3d0de14a70..e57870a510 100644
--- a/boost/iostreams/filter/zlib.hpp
+++ b/boost/iostreams/filter/zlib.hpp
@@ -149,8 +149,12 @@ namespace detail {
template<typename Alloc>
struct zlib_allocator_traits {
#ifndef BOOST_NO_STD_ALLOCATOR
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
typedef typename Alloc::template rebind<char>::other type;
#else
+ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<char> type;
+#endif
+#else
typedef std::allocator<char> type;
#endif
};
@@ -160,7 +164,11 @@ template< typename Alloc,
BOOST_DEDUCED_TYPENAME zlib_allocator_traits<Alloc>::type >
struct zlib_allocator : private Base {
private:
+#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
typedef typename Base::size_type size_type;
+#else
+ typedef typename std::allocator_traits<Base>::size_type size_type;
+#endif
public:
BOOST_STATIC_CONSTANT(bool, custom =
(!is_same<std::allocator<char>, Base>::value));