Add foa-based node containers to link tests

This commit is contained in:
Christian Mazakas
2023-02-14 10:27:12 -08:00
parent f0d10308e3
commit b21ad13bbb
2 changed files with 12 additions and 6 deletions

View File

@ -1,20 +1,23 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2022 Christian Mazakas.
// Copyright 2022-2023 Christian Mazakas.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "../helpers/unordered.hpp"
#ifdef BOOST_UNORDERED_FOA_TESTS
void foo(boost::unordered_flat_set<int>&, boost::unordered_flat_map<int, int>&);
void foo(boost::unordered_flat_set<int>&, boost::unordered_flat_map<int, int>&,
boost::unordered_node_set<int>&, boost::unordered_node_map<int, int>&);
int main()
{
boost::unordered_flat_set<int> x1;
boost::unordered_flat_map<int, int> x2;
boost::unordered_node_set<int> x3;
boost::unordered_node_map<int, int> x4;
foo(x1, x2);
foo(x1, x2, x3, x4);
return 0;
}

View File

@ -1,14 +1,15 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2022 Christian Mazakas.
// Copyright 2022-2023 Christian Mazakas.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "../helpers/unordered.hpp"
#ifdef BOOST_UNORDERED_FOA_TESTS
void foo(
boost::unordered_flat_set<int>& x1, boost::unordered_flat_map<int, int>& x2)
void foo(boost::unordered_flat_set<int>& x1,
boost::unordered_flat_map<int, int>& x2, boost::unordered_node_set<int>& x3,
boost::unordered_node_map<int, int>& x4)
{
#if BOOST_WORKAROUND(BOOST_CODEGEARC, BOOST_TESTED_AT(0x0613))
struct dummy
@ -20,6 +21,8 @@ void foo(
x1.insert(1);
x2[2] = 2;
x3.insert(3);
x4.insert(std::make_pair(4, 5));
}
#else
void foo(boost::unordered_set<int>& x1, boost::unordered_map<int, int>& x2,