diff --git a/include/boost/unordered/detail/allocate.hpp b/include/boost/unordered/detail/allocate.hpp index 73cff77c..7a330ca2 100644 --- a/include/boost/unordered/detail/allocate.hpp +++ b/include/boost/unordered/detail/allocate.hpp @@ -237,9 +237,8 @@ BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, // 2 = boost::container::allocator_traits #if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS) -# if defined(__GXX_EXPERIMENTAL_CXX0X__) && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) -# define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 0 +# if !defined(BOOST_NO_CXX11_ALLOCATOR) +# define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 1 # elif defined(BOOST_MSVC) # if BOOST_MSVC < 1400 // Use container's allocator_traits for older versions of Visual diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f2207f89..269413b6 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -27,6 +27,9 @@ test-suite unordered [ run unordered/minimal_allocator.cpp ] [ run unordered/compile_set.cpp ] [ run unordered/compile_map.cpp ] + [ run unordered/compile_map.cpp : : + : BOOST_UNORDERED_USE_ALLOCATOR=0 + : compile_map_unordered_allocator ] [ run unordered/noexcept_tests.cpp ] [ run unordered/link_test_1.cpp unordered/link_test_2.cpp ] [ run unordered/incomplete_test.cpp ]