mirror of
https://github.com/boostorg/unordered.git
synced 2025-08-01 20:34:28 +02:00
Add link_test
This commit is contained in:
@@ -107,6 +107,7 @@ build_foa fwd_map_test ;
|
|||||||
build_foa compile_set ;
|
build_foa compile_set ;
|
||||||
build_foa compile_map ;
|
build_foa compile_map ;
|
||||||
build_foa noexcept_tests ;
|
build_foa noexcept_tests ;
|
||||||
|
run unordered/link_test_1.cpp unordered/link_test_2.cpp : : : <cxxstd>98:<build>no <cxxstd>03:<build>no <cxxstd>0x:<build>no <define>BOOST_UNORDERED_FOA_TESTS : foa_link_test ;
|
||||||
build_foa constructor_tests ;
|
build_foa constructor_tests ;
|
||||||
build_foa copy_tests ;
|
build_foa copy_tests ;
|
||||||
build_foa move_tests ;
|
build_foa move_tests ;
|
||||||
|
@@ -5,11 +5,30 @@
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#include "../helpers/prefix.hpp"
|
#include "../helpers/prefix.hpp"
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
#include <boost/unordered_flat_set.hpp>
|
||||||
|
#include <boost/unordered_flat_map.hpp>
|
||||||
|
#include <boost/unordered/detail/implementation.hpp>
|
||||||
|
#else
|
||||||
#include <boost/unordered_set.hpp>
|
#include <boost/unordered_set.hpp>
|
||||||
#include <boost/unordered_map.hpp>
|
#include <boost/unordered_map.hpp>
|
||||||
|
#endif
|
||||||
#include "../helpers/postfix.hpp"
|
#include "../helpers/postfix.hpp"
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
void foo(boost::unordered_flat_set<int>&, boost::unordered_flat_map<int, int>&);
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
boost::unordered_flat_set<int> x1;
|
||||||
|
boost::unordered_flat_map<int, int> x2;
|
||||||
|
|
||||||
|
foo(x1, x2);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
void foo(boost::unordered_set<int>&, boost::unordered_map<int, int>&,
|
void foo(boost::unordered_set<int>&, boost::unordered_map<int, int>&,
|
||||||
boost::unordered_multiset<int>&, boost::unordered_multimap<int, int>&);
|
boost::unordered_multiset<int>&, boost::unordered_multimap<int, int>&);
|
||||||
|
|
||||||
@@ -24,3 +43,4 @@ int main()
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@@ -5,11 +5,33 @@
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#include "../helpers/prefix.hpp"
|
#include "../helpers/prefix.hpp"
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
#include <boost/unordered_flat_set.hpp>
|
||||||
|
#include <boost/unordered_flat_map.hpp>
|
||||||
|
#include <boost/unordered/detail/implementation.hpp>
|
||||||
|
#else
|
||||||
#include <boost/unordered_set.hpp>
|
#include <boost/unordered_set.hpp>
|
||||||
#include <boost/unordered_map.hpp>
|
#include <boost/unordered_map.hpp>
|
||||||
|
#endif
|
||||||
#include "../helpers/postfix.hpp"
|
#include "../helpers/postfix.hpp"
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
void foo(
|
||||||
|
boost::unordered_flat_set<int>& x1, boost::unordered_flat_map<int, int>& x2)
|
||||||
|
{
|
||||||
|
#if BOOST_WORKAROUND(BOOST_CODEGEARC, BOOST_TESTED_AT(0x0613))
|
||||||
|
struct dummy
|
||||||
|
{
|
||||||
|
boost::unordered_flat_set<int> x1;
|
||||||
|
boost::unordered_flat_map<int, int> x2;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
x1.insert(1);
|
||||||
|
x2[2] = 2;
|
||||||
|
}
|
||||||
|
#else
|
||||||
void foo(boost::unordered_set<int>& x1, boost::unordered_map<int, int>& x2,
|
void foo(boost::unordered_set<int>& x1, boost::unordered_map<int, int>& x2,
|
||||||
boost::unordered_multiset<int>& x3, boost::unordered_multimap<int, int>& x4)
|
boost::unordered_multiset<int>& x3, boost::unordered_multimap<int, int>& x4)
|
||||||
{
|
{
|
||||||
@@ -28,3 +50,4 @@ void foo(boost::unordered_set<int>& x1, boost::unordered_map<int, int>& x2,
|
|||||||
x3.insert(3);
|
x3.insert(3);
|
||||||
x4.insert(std::make_pair(4, 5));
|
x4.insert(std::make_pair(4, 5));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user