diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index e95b1d43..a95dde23 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -82,29 +82,6 @@ #define BOOST_UNORDERED_EMPLACE_LIMIT 10 #endif -// BOOST_UNORDERED_USE_ALLOCATOR_TRAITS - Pick which version of -// allocator_traits to use. -// -// 0 = Own partial implementation -// 1 = std::allocator_traits -// 2 = boost::container::allocator_traits - -#if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS) -#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 -// C++ as I don't test with them. -#define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 2 -#endif -#endif -#endif - -#if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS) -#define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 0 -#endif - // BOOST_UNORDERED_TUPLE_ARGS // // Maximum number of std::tuple members to support, or 0 if std::tuple @@ -155,10 +132,7 @@ #elif BOOST_COMP_GNUC && BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(4, 7, 0) // Piecewise construction in GCC 4.6 doesn't work for uncopyable types. #define BOOST_UNORDERED_CXX11_CONSTRUCTION 0 -#elif BOOST_UNORDERED_USE_ALLOCATOR_TRAITS == 0 && \ - !defined(BOOST_NO_SFINAE_EXPR) -#define BOOST_UNORDERED_CXX11_CONSTRUCTION 1 -#elif BOOST_UNORDERED_USE_ALLOCATOR_TRAITS == 1 +#elif !defined(BOOST_NO_CXX11_ALLOCATOR) #define BOOST_UNORDERED_CXX11_CONSTRUCTION 1 #endif #endif diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index e91cfc98..0d98abe2 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -29,8 +29,7 @@ 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_TRAITS=0 + [ run unordered/compile_map.cpp : : : : compile_map_unordered_allocator ] [ run unordered/noexcept_tests.cpp ] [ run unordered/link_test_1.cpp unordered/link_test_2.cpp ] diff --git a/test/helpers/test.hpp b/test/helpers/test.hpp index 5534f811..dabd7c24 100644 --- a/test/helpers/test.hpp +++ b/test/helpers/test.hpp @@ -137,8 +137,6 @@ namespace test { << BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT << "\n" \ << "BOOST_UNORDERED_EMPLACE_LIMIT: " << BOOST_UNORDERED_EMPLACE_LIMIT \ << "\n" \ - << "BOOST_UNORDERED_USE_ALLOCATOR_TRAITS: " \ - << BOOST_UNORDERED_USE_ALLOCATOR_TRAITS << "\n" \ << "BOOST_UNORDERED_CXX11_CONSTRUCTION: " \ << BOOST_UNORDERED_CXX11_CONSTRUCTION << "\n\n" \ << std::flush; \ diff --git a/test/unordered/allocator_traits.cpp b/test/unordered/allocator_traits.cpp index ede48476..7e332aab 100644 --- a/test/unordered/allocator_traits.cpp +++ b/test/unordered/allocator_traits.cpp @@ -111,7 +111,7 @@ void test_empty_allocator() { typedef empty_allocator allocator; typedef boost::unordered::detail::allocator_traits traits; -#if BOOST_UNORDERED_USE_ALLOCATOR_TRAITS == 1 +#if !defined(BOOST_NO_CXX11_ALLOCATOR) BOOST_STATIC_ASSERT((boost::is_same::type>::value)); #else @@ -153,7 +153,7 @@ void test_allocator1() { typedef allocator1 allocator; typedef boost::unordered::detail::allocator_traits traits; -#if BOOST_UNORDERED_USE_ALLOCATOR_TRAITS == 1 +#if !defined(BOOST_NO_CXX11_ALLOCATOR) BOOST_STATIC_ASSERT((boost::is_same::type>::value)); #else diff --git a/test/unordered/minimal_allocator.cpp b/test/unordered/minimal_allocator.cpp index a692443e..bbbb3f1a 100644 --- a/test/unordered/minimal_allocator.cpp +++ b/test/unordered/minimal_allocator.cpp @@ -48,7 +48,7 @@ template void test_simple_allocator() BOOST_STATIC_ASSERT( (boost::is_same::value)); -#if BOOST_UNORDERED_USE_ALLOCATOR_TRAITS == 1 +#if !defined(BOOST_NO_CXX11_ALLOCATOR) BOOST_STATIC_ASSERT((boost::is_same::type>::value)); #else