forked from boostorg/config
Merge pull request #14 from glenfe/develop
BOOST_NO_CXX11_ALLOCATOR should be defined with libc++ in C++03 mode
This commit is contained in:
@@ -23,6 +23,14 @@
|
|||||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11
|
||||||
|
// allocator model. The C++11 allocator model requires a conforming
|
||||||
|
// std::allocator_traits which is only possible with C++11 template
|
||||||
|
// aliases since members rebind_alloc and rebind_traits require it.
|
||||||
|
#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
|
||||||
|
# define BOOST_NO_CXX11_ALLOCATOR
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// These appear to be unusable/incomplete so far:
|
// These appear to be unusable/incomplete so far:
|
||||||
//
|
//
|
||||||
|
@@ -31,11 +31,13 @@ int test()
|
|||||||
std::allocator<int> ia;
|
std::allocator<int> ia;
|
||||||
std::allocator_traits<std::allocator<int> >::rebind_alloc<void*> ra(ia);
|
std::allocator_traits<std::allocator<int> >::rebind_alloc<void*> ra(ia);
|
||||||
std::allocator<void*>* pva = &ra;
|
std::allocator<void*>* pva = &ra;
|
||||||
|
std::allocator_traits<std::allocator<int> >::rebind_traits<void*>::pointer pt;
|
||||||
|
|
||||||
(void)aat;
|
(void)aat;
|
||||||
(void)ua;
|
(void)ua;
|
||||||
(void)at;
|
(void)at;
|
||||||
(void)pva;
|
(void)pva;
|
||||||
|
(void)pt;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user