Use std::allocator_traits where available.

Might have to revert this when implementing C++17 features.
This commit is contained in:
Daniel James
2016-10-14 09:27:40 +01:00
parent da6e8e8041
commit b907cee691
2 changed files with 5 additions and 3 deletions

View File

@ -237,9 +237,8 @@ BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS,
// 2 = boost::container::allocator_traits // 2 = boost::container::allocator_traits
#if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS) #if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) && \ # if !defined(BOOST_NO_CXX11_ALLOCATOR)
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) # define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 1
# define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 0
# elif defined(BOOST_MSVC) # elif defined(BOOST_MSVC)
# if BOOST_MSVC < 1400 # if BOOST_MSVC < 1400
// Use container's allocator_traits for older versions of Visual // Use container's allocator_traits for older versions of Visual

View File

@ -27,6 +27,9 @@ test-suite unordered
[ run unordered/minimal_allocator.cpp ] [ run unordered/minimal_allocator.cpp ]
[ run unordered/compile_set.cpp ] [ run unordered/compile_set.cpp ]
[ run unordered/compile_map.cpp ] [ run unordered/compile_map.cpp ]
[ run unordered/compile_map.cpp : :
: <define>BOOST_UNORDERED_USE_ALLOCATOR=0
: compile_map_unordered_allocator ]
[ run unordered/noexcept_tests.cpp ] [ run unordered/noexcept_tests.cpp ]
[ run unordered/link_test_1.cpp unordered/link_test_2.cpp ] [ run unordered/link_test_1.cpp unordered/link_test_2.cpp ]
[ run unordered/incomplete_test.cpp ] [ run unordered/incomplete_test.cpp ]