forked from boostorg/smart_ptr
Work around VC11 which has broken rebind_traits
VC11 has only partial support for C++11 allocators. For example it has a non-conforming rebind_alloc and rebind_traits in std::allocator_traits because it does not support C++11 template aliases.
This commit is contained in:
1 parent
540149f019
commit
6d73b4aa54
3 files changed
+167
-53
No files matched your search
@@ -74,16 +74,19 @@ namespace boost {
|
||||
}
|
||||
|
||||
private:
|
||||
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
|
||||
#if !defined(BOOST_NO_CXX11_ALLOCATOR) && \
|
||||
!defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
typedef typename std::allocator_traits<A>::
|
||||
template rebind_alloc<type> TA;
|
||||
typedef typename std::allocator_traits<A>::
|
||||
template rebind_traits<type> TT;
|
||||
#else
|
||||
typedef typename A::
|
||||
template rebind<type>::other TA;
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
|
||||
typedef std::allocator_traits<TA> TT;
|
||||
#endif
|
||||
|
||||
void destroy(type*, std::size_t, boost::true_type) {
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user