zcashd/depends/patches/boost/deprecated-two-arg-allocate...

103 lines
3.1 KiB
Diff

diff -ur orig/include/boost/core/allocator_access.hpp patched/include/boost/core/allocator_access.hpp
--- orig/include/boost/core/allocator_access.hpp 2021-01-18 21:42:05.926895400 +0000
+++ patched/include/boost/core/allocator_access.hpp 2021-01-18 21:44:26.426895400 +0000
@@ -11,7 +11,7 @@
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
#include <boost/core/pointer_traits.hpp>
-#if !defined(BOOST_MSVC)
+#if !defined(BOOST_MSVC) && !defined(BOOST_CLANG)
#include <limits>
#else
#include <memory>
@@ -49,7 +49,7 @@
struct allocator_pointer {
typedef typename A::pointer type;
};
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A>
struct allocator_pointer {
typedef typename std::allocator_traits<A>::pointer type;
@@ -72,7 +72,7 @@
struct allocator_const_pointer {
typedef typename A::const_pointer type;
};
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A>
struct allocator_const_pointer {
typedef typename std::allocator_traits<A>::const_pointer type;
@@ -137,7 +137,7 @@
struct allocator_difference_type {
typedef typename A::difference_type type;
};
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A>
struct allocator_difference_type {
typedef typename std::allocator_traits<A>::difference_type type;
@@ -161,7 +161,7 @@
struct allocator_size_type {
typedef typename A::size_type type;
};
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A>
struct allocator_size_type {
typedef typename std::allocator_traits<A>::size_type type;
@@ -260,7 +260,7 @@
struct allocator_rebind {
typedef typename A::template rebind<T>::other type;
};
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A, class T>
struct allocator_rebind {
typedef typename std::allocator_traits<A>::template rebind_alloc<T> type;
@@ -313,7 +313,7 @@
{
return a.allocate(n, h);
}
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A>
inline typename allocator_pointer<A>::type
allocator_allocate(A& a, typename allocator_size_type<A>::type n,
@@ -400,7 +400,7 @@
::new((void*)p) T(v);
}
#endif
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A, class T, class... Args>
inline void
allocator_construct(A& a, T* p, Args&&... args)
@@ -449,7 +449,7 @@
p->~T();
(void)p;
}
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A, class T>
inline void
allocator_destroy(A& a, T* p)
@@ -496,7 +496,7 @@
{
return a.max_size();
}
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A>
inline typename allocator_size_type<A>::type
allocator_max_size(const A& a)
@@ -545,7 +545,7 @@
{
return a;
}
-#elif defined(BOOST_MSVC)
+#elif defined(BOOST_MSVC) || defined(BOOST_CLANG)
template<class A>
inline A
allocator_select_on_container_copy_construction(const A& a)