forked from boostorg/unordered
Unordered: Use C++11 allocator_traits with gcc 4.7.
[SVN r76970]
This commit is contained in:
@ -27,7 +27,14 @@
|
|||||||
#include <boost/utility/addressof.hpp>
|
#include <boost/utility/addressof.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS)
|
#if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS)
|
||||||
#define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 0
|
# if defined(__GXX_EXPERIMENTAL_CXX0X__) && \
|
||||||
|
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
|
||||||
|
# define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS)
|
||||||
|
# define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BOOST_UNORDERED_USE_ALLOCATOR_TRAITS
|
#if BOOST_UNORDERED_USE_ALLOCATOR_TRAITS
|
||||||
|
@ -132,7 +132,7 @@ void test_allocator1()
|
|||||||
BOOST_MPL_ASSERT((boost::is_same<typename traits::size_type,
|
BOOST_MPL_ASSERT((boost::is_same<typename traits::size_type,
|
||||||
std::make_unsigned<std::ptrdiff_t>::type>));
|
std::make_unsigned<std::ptrdiff_t>::type>));
|
||||||
#else
|
#else
|
||||||
BOOST_MPL_ASSERT((boost::is_same<traits::size_type, std::size_t>));
|
BOOST_MPL_ASSERT((boost::is_same<typename traits::size_type, std::size_t>));
|
||||||
#endif
|
#endif
|
||||||
BOOST_MPL_ASSERT((boost::is_same<traits::difference_type, std::ptrdiff_t>));
|
BOOST_MPL_ASSERT((boost::is_same<traits::difference_type, std::ptrdiff_t>));
|
||||||
BOOST_MPL_ASSERT((boost::is_same<traits::pointer, int*>));
|
BOOST_MPL_ASSERT((boost::is_same<traits::pointer, int*>));
|
||||||
|
Reference in New Issue
Block a user