summaryrefslogtreecommitdiff
path: root/boost/iostreams/filter
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
commitb8cf34c691623e4ec329053cbbf68522a855882d (patch)
tree34da08632a99677f6b79ecb65e5b655a5b69a67f /boost/iostreams/filter
parent3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff)
downloadboost-upstream/1.67.0.tar.gz
boost-upstream/1.67.0.tar.bz2
boost-upstream/1.67.0.zip
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boost/iostreams/filter')
-rw-r--r--boost/iostreams/filter/bzip2.hpp8
-rw-r--r--boost/iostreams/filter/lzma.hpp8
-rw-r--r--boost/iostreams/filter/zlib.hpp8
3 files changed, 24 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));
diff --git a/boost/iostreams/filter/lzma.hpp b/boost/iostreams/filter/lzma.hpp
index f15f6794a7..94cd2b3b54 100644
--- a/boost/iostreams/filter/lzma.hpp
+++ b/boost/iostreams/filter/lzma.hpp
@@ -112,8 +112,12 @@ namespace detail {
template<typename Alloc>
struct lzma_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
};
@@ -123,7 +127,11 @@ template< typename Alloc,
BOOST_DEDUCED_TYPENAME lzma_allocator_traits<Alloc>::type >
struct lzma_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));
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));