summaryrefslogtreecommitdiff
path: root/boost/iostreams/filter/bzip2.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/iostreams/filter/bzip2.hpp')
-rw-r--r--boost/iostreams/filter/bzip2.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/boost/iostreams/filter/bzip2.hpp b/boost/iostreams/filter/bzip2.hpp
index 029338d1c6..b9c04a7ce1 100644
--- a/boost/iostreams/filter/bzip2.hpp
+++ b/boost/iostreams/filter/bzip2.hpp
@@ -123,8 +123,12 @@ namespace detail {
template<typename Alloc>
struct bzip2_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
};
@@ -134,7 +138,11 @@ template< typename Alloc,
BOOST_DEDUCED_TYPENAME bzip2_allocator_traits<Alloc>::type >
struct bzip2_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));