diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9c875f20..3fdc0edb 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -107,6 +107,7 @@ build_foa fwd_map_test ; build_foa compile_set ; build_foa compile_map ; build_foa noexcept_tests ; +run unordered/link_test_1.cpp unordered/link_test_2.cpp : : : 98:no 03:no 0x:no BOOST_UNORDERED_FOA_TESTS : foa_link_test ; build_foa constructor_tests ; build_foa copy_tests ; build_foa move_tests ; diff --git a/test/unordered/link_test_1.cpp b/test/unordered/link_test_1.cpp index c32c3ac9..2e9b3631 100644 --- a/test/unordered/link_test_1.cpp +++ b/test/unordered/link_test_1.cpp @@ -5,11 +5,30 @@ // 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 +#ifdef BOOST_UNORDERED_FOA_TESTS +void foo(boost::unordered_flat_set&, boost::unordered_flat_map&); + +int main() +{ + boost::unordered_flat_set x1; + boost::unordered_flat_map x2; + + foo(x1, x2); + + return 0; +} +#else void foo(boost::unordered_set&, boost::unordered_map&, boost::unordered_multiset&, boost::unordered_multimap&); @@ -24,3 +43,4 @@ int main() return 0; } +#endif diff --git a/test/unordered/link_test_2.cpp b/test/unordered/link_test_2.cpp index 1c3ed766..fb42ba0d 100644 --- a/test/unordered/link_test_2.cpp +++ b/test/unordered/link_test_2.cpp @@ -5,11 +5,33 @@ // 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 +#ifdef BOOST_UNORDERED_FOA_TESTS +void foo( + boost::unordered_flat_set& x1, boost::unordered_flat_map& x2) +{ +#if BOOST_WORKAROUND(BOOST_CODEGEARC, BOOST_TESTED_AT(0x0613)) + struct dummy + { + boost::unordered_flat_set x1; + boost::unordered_flat_map x2; + }; +#endif + + x1.insert(1); + x2[2] = 2; +} +#else void foo(boost::unordered_set& x1, boost::unordered_map& x2, boost::unordered_multiset& x3, boost::unordered_multimap& x4) { @@ -28,3 +50,4 @@ void foo(boost::unordered_set& x1, boost::unordered_map& x2, x3.insert(3); x4.insert(std::make_pair(4, 5)); } +#endif