diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index c33da46c..572fa265 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -126,6 +126,7 @@ build_foa load_factor_tests ; build_foa rehash_tests ; build_foa equality_tests ; build_foa swap_tests ; +run unordered/scoped_allocator.cpp : : : 98:no 03:no 0x:no msvc-14.0:no BOOST_UNORDERED_FOA_TESTS : foa_scoped_allocator ; build_foa transparent_tests ; build_foa reserve_tests ; build_foa contains_tests ; diff --git a/test/unordered/scoped_allocator.cpp b/test/unordered/scoped_allocator.cpp index a8e02c8b..cde1f96e 100644 --- a/test/unordered/scoped_allocator.cpp +++ b/test/unordered/scoped_allocator.cpp @@ -21,8 +21,14 @@ int main() {} // clang-format off #include "../helpers/prefix.hpp" +#ifdef BOOST_UNORDERED_FOA_TESTS +#include +#include +#include +#else #include #include +#endif #include "../helpers/postfix.hpp" // clang-format on @@ -32,10 +38,10 @@ int main() {} #include +#include #include #include #include -#include namespace test { template struct allocator @@ -70,9 +76,15 @@ typedef std::scoped_allocator_adaptor, test::allocator > allocator_type; +#ifdef BOOST_UNORDERED_FOA_TESTS +typedef boost::unordered_flat_map, std::equal_to, allocator_type> + map_type; +#else typedef boost::unordered_map, std::equal_to, allocator_type> map_type; +#endif UNORDERED_AUTO_TEST (scoped_allocator) { allocator_type alloc(