forked from boostorg/unordered
Remove BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT
This commit is contained in:
@@ -451,7 +451,7 @@ void unordered_map_test(X& r, Key const& k, T const& v)
|
||||
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||
r.emplace(std::piecewise_construct, std::make_tuple(k), std::make_tuple(v));
|
||||
#else
|
||||
r.emplace(boost::unordered::piecewise_construct, boost::make_tuple(k),
|
||||
r.emplace(std::piecewise_construct, boost::make_tuple(k),
|
||||
boost::make_tuple(v));
|
||||
#endif
|
||||
|
||||
@@ -465,7 +465,7 @@ void unordered_map_test(X& r, Key const& k, T const& v)
|
||||
r.emplace_hint(r.begin(), std::piecewise_construct, std::make_tuple(k),
|
||||
std::make_tuple(v));
|
||||
#else
|
||||
r.emplace_hint(r.begin(), boost::unordered::piecewise_construct,
|
||||
r.emplace_hint(r.begin(), std::piecewise_construct,
|
||||
boost::make_tuple(k), boost::make_tuple(v));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -453,7 +453,7 @@ namespace emplace_tests {
|
||||
// 5/8 args + duplicate
|
||||
emplace_value k1(5, "", 'b', 4, 5);
|
||||
emplace_value m1(8, "xxx", 'z', 4, 5, 6, 7, 8);
|
||||
r1 = x.emplace(boost::unordered::piecewise_construct,
|
||||
r1 = x.emplace(std::piecewise_construct,
|
||||
boost::make_tuple(5, "", 'b', 4, 5),
|
||||
boost::make_tuple(8, "xxx", 'z', 4, 5, 6, 7, 8));
|
||||
BOOST_TEST_EQ(x.size(), 1u);
|
||||
@@ -463,7 +463,7 @@ namespace emplace_tests {
|
||||
BOOST_TEST_EQ(check_.instances(), 4);
|
||||
BOOST_TEST_EQ(check_.constructions(), 4);
|
||||
|
||||
r2 = x.emplace(boost::unordered::piecewise_construct,
|
||||
r2 = x.emplace(std::piecewise_construct,
|
||||
boost::make_tuple(5, "", 'b', 4, 5),
|
||||
boost::make_tuple(8, "xxx", 'z', 4, 5, 6, 7, 8));
|
||||
BOOST_TEST_EQ(x.size(), 1u);
|
||||
@@ -479,7 +479,7 @@ namespace emplace_tests {
|
||||
|
||||
emplace_value k2(9, "", 'b', 4, 5, 6, 7, 8, 9);
|
||||
emplace_value m2(3, "aaa", 'm');
|
||||
r1 = x.emplace(boost::unordered::piecewise_construct,
|
||||
r1 = x.emplace(std::piecewise_construct,
|
||||
boost::make_tuple(9, "", 'b', 4, 5, 6, 7, 8, 9),
|
||||
boost::make_tuple(3, "aaa", 'm'));
|
||||
BOOST_TEST_EQ(x.size(), 2u);
|
||||
@@ -492,15 +492,15 @@ namespace emplace_tests {
|
||||
BOOST_TEST_EQ(check_.constructions(), 10);
|
||||
|
||||
BOOST_TEST(r1.first == x.emplace_hint(r1.first,
|
||||
boost::unordered::piecewise_construct,
|
||||
std::piecewise_construct,
|
||||
boost::make_tuple(9, "", 'b', 4, 5, 6, 7, 8, 9),
|
||||
boost::make_tuple(15, "jkjk")));
|
||||
BOOST_TEST(r1.first == x.emplace_hint(r2.first,
|
||||
boost::unordered::piecewise_construct,
|
||||
std::piecewise_construct,
|
||||
boost::make_tuple(9, "", 'b', 4, 5, 6, 7, 8, 9),
|
||||
boost::make_tuple(275, "xxx", 'm', 6)));
|
||||
BOOST_TEST(
|
||||
r1.first == x.emplace_hint(x.end(), boost::unordered::piecewise_construct,
|
||||
r1.first == x.emplace_hint(x.end(), std::piecewise_construct,
|
||||
boost::make_tuple(9, "", 'b', 4, 5, 6, 7, 8, 9),
|
||||
boost::make_tuple(-10, "blah blah", '\0')));
|
||||
BOOST_TEST_EQ(x.size(), 2u);
|
||||
@@ -540,7 +540,7 @@ namespace emplace_tests {
|
||||
|
||||
emplace_value k1(5, "", 'b', 4, 5);
|
||||
emplace_value m1(8, "xxx", 'z', 4, 5, 6, 7, 8);
|
||||
i1 = x.emplace(boost::unordered::piecewise_construct,
|
||||
i1 = x.emplace(std::piecewise_construct,
|
||||
boost::make_tuple(5, "", 'b', 4, 5),
|
||||
boost::make_tuple(8, "xxx", 'z', 4, 5, 6, 7, 8));
|
||||
BOOST_TEST_EQ(x.size(), 1u);
|
||||
@@ -550,7 +550,7 @@ namespace emplace_tests {
|
||||
BOOST_TEST_EQ(check_.constructions(), 4);
|
||||
|
||||
emplace_value m1a(8, "xxx", 'z', 4, 5, 6, 7, 8);
|
||||
i2 = x.emplace(boost::unordered::piecewise_construct,
|
||||
i2 = x.emplace(std::piecewise_construct,
|
||||
boost::make_tuple(5, "", 'b', 4, 5),
|
||||
boost::make_tuple(8, "xxx", 'z', 4, 5, 6, 7, 8));
|
||||
BOOST_TEST_EQ(x.size(), 2u);
|
||||
@@ -564,7 +564,7 @@ namespace emplace_tests {
|
||||
|
||||
emplace_value k2(9, "", 'b', 4, 5, 6, 7, 8, 9);
|
||||
emplace_value m2(3, "aaa", 'm');
|
||||
i1 = x.emplace(boost::unordered::piecewise_construct,
|
||||
i1 = x.emplace(std::piecewise_construct,
|
||||
boost::make_tuple(9, "", 'b', 4, 5, 6, 7, 8, 9),
|
||||
boost::make_tuple(3, "aaa", 'm'));
|
||||
BOOST_TEST_EQ(x.size(), 3u);
|
||||
@@ -574,15 +574,15 @@ namespace emplace_tests {
|
||||
BOOST_TEST_EQ(check_.constructions(), 11);
|
||||
|
||||
emplace_value m2a(15, "jkjk");
|
||||
i2 = x.emplace_hint(i2, boost::unordered::piecewise_construct,
|
||||
i2 = x.emplace_hint(i2, std::piecewise_construct,
|
||||
boost::make_tuple(9, "", 'b', 4, 5, 6, 7, 8, 9),
|
||||
boost::make_tuple(15, "jkjk"));
|
||||
emplace_value m2b(275, "xxx", 'm', 6);
|
||||
i3 = x.emplace_hint(i1, boost::unordered::piecewise_construct,
|
||||
i3 = x.emplace_hint(i1, std::piecewise_construct,
|
||||
boost::make_tuple(9, "", 'b', 4, 5, 6, 7, 8, 9),
|
||||
boost::make_tuple(275, "xxx", 'm', 6));
|
||||
emplace_value m2c(-10, "blah blah", '\0');
|
||||
i4 = x.emplace_hint(x.end(), boost::unordered::piecewise_construct,
|
||||
i4 = x.emplace_hint(x.end(), std::piecewise_construct,
|
||||
boost::make_tuple(9, "", 'b', 4, 5, 6, 7, 8, 9),
|
||||
boost::make_tuple(-10, "blah blah", '\0'));
|
||||
BOOST_TEST_EQ(x.size(), 6u);
|
||||
|
||||
@@ -1331,7 +1331,7 @@ namespace insert_tests {
|
||||
#endif
|
||||
|
||||
struct derived_from_piecewise_construct_t
|
||||
: boost::unordered::piecewise_construct_t
|
||||
: std::piecewise_construct_t
|
||||
{
|
||||
};
|
||||
|
||||
@@ -1342,9 +1342,9 @@ namespace insert_tests {
|
||||
|
||||
struct convertible_to_piecewise
|
||||
{
|
||||
operator boost::unordered::piecewise_construct_t() const
|
||||
operator std::piecewise_construct_t() const
|
||||
{
|
||||
return boost::unordered::piecewise_construct;
|
||||
return std::piecewise_construct;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1362,7 +1362,7 @@ namespace insert_tests {
|
||||
std::pair<overloaded_constructor const, overloaded_constructor> > >
|
||||
x;
|
||||
|
||||
x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(),
|
||||
x.emplace(std::piecewise_construct, boost::make_tuple(),
|
||||
boost::make_tuple());
|
||||
BOOST_TEST(
|
||||
x.find(overloaded_constructor()) != x.end() &&
|
||||
@@ -1429,7 +1429,7 @@ namespace insert_tests {
|
||||
std::pair<overloaded_constructor const, overloaded_constructor> > >
|
||||
x;
|
||||
|
||||
x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(),
|
||||
x.emplace(std::piecewise_construct, boost::make_tuple(),
|
||||
boost::make_tuple());
|
||||
BOOST_TEST(
|
||||
x.find(overloaded_constructor()) != x.end() &&
|
||||
@@ -1461,12 +1461,12 @@ namespace insert_tests {
|
||||
x;
|
||||
std::pair<overloaded_constructor, overloaded_constructor> check;
|
||||
|
||||
x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(),
|
||||
x.emplace(std::piecewise_construct, boost::make_tuple(),
|
||||
boost::make_tuple());
|
||||
BOOST_TEST(x.find(check) != x.end() && *x.find(check) == check);
|
||||
|
||||
x.clear();
|
||||
x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(1),
|
||||
x.emplace(std::piecewise_construct, boost::make_tuple(1),
|
||||
boost::make_tuple(2, 3));
|
||||
check =
|
||||
std::make_pair(overloaded_constructor(1), overloaded_constructor(2, 3));
|
||||
@@ -1487,13 +1487,6 @@ namespace insert_tests {
|
||||
static boost::unordered_set<std::pair<overloaded_constructor,
|
||||
overloaded_constructor> >* test_pair_oc_set;
|
||||
|
||||
#define PIECEWISE_TEST_NAME boost_tuple_piecewise_tests
|
||||
#define PIECEWISE_NAMESPACE boost::unordered
|
||||
#define TUPLE_NAMESPACE boost
|
||||
#define EMULATING_PIECEWISE_CONSTRUCTION 1
|
||||
#include "./insert_tests.cpp"
|
||||
|
||||
#if BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT
|
||||
|
||||
#define PIECEWISE_TEST_NAME boost_tuple_std_piecewise_tests
|
||||
#define PIECEWISE_NAMESPACE std
|
||||
@@ -1503,21 +1496,6 @@ namespace insert_tests {
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
|
||||
|
||||
#define PIECEWISE_TEST_NAME std_tuple_boost_piecewise_tests
|
||||
#define PIECEWISE_NAMESPACE boost::unordered
|
||||
#define TUPLE_NAMESPACE std
|
||||
#define EMULATING_PIECEWISE_CONSTRUCTION 0
|
||||
#include "./insert_tests.cpp"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
|
||||
BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT
|
||||
|
||||
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||
static boost::unordered_flat_set<std::pair<overloaded_constructor,
|
||||
overloaded_constructor> >* test_pair_oc_set;
|
||||
@@ -1531,8 +1509,6 @@ namespace insert_tests {
|
||||
#define TUPLE_NAMESPACE std
|
||||
#define EMULATING_PIECEWISE_CONSTRUCTION 0
|
||||
#include "./insert_tests.cpp"
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
RUN_TESTS_QUIET()
|
||||
|
||||
@@ -469,7 +469,7 @@ namespace unnecessary_copy_tests {
|
||||
#endif
|
||||
|
||||
reset();
|
||||
x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(),
|
||||
x.emplace(std::piecewise_construct, boost::make_tuple(),
|
||||
boost::make_tuple());
|
||||
COPY_COUNT(2);
|
||||
MOVE_COUNT(0);
|
||||
@@ -536,7 +536,7 @@ namespace unnecessary_copy_tests {
|
||||
MOVE_COUNT(0);
|
||||
|
||||
reset();
|
||||
x.emplace(boost::unordered::piecewise_construct,
|
||||
x.emplace(std::piecewise_construct,
|
||||
boost::make_tuple(boost::ref(b.first)),
|
||||
boost::make_tuple(boost::ref(b.second)));
|
||||
COPY_COUNT(0);
|
||||
@@ -545,7 +545,7 @@ namespace unnecessary_copy_tests {
|
||||
#if BOOST_UNORDERED_TUPLE_ARGS
|
||||
|
||||
reset();
|
||||
x.emplace(boost::unordered::piecewise_construct,
|
||||
x.emplace(std::piecewise_construct,
|
||||
std::make_tuple(std::ref(b.first)), std::make_tuple(std::ref(b.second)));
|
||||
COPY_COUNT(0);
|
||||
MOVE_COUNT(0);
|
||||
@@ -559,7 +559,7 @@ namespace unnecessary_copy_tests {
|
||||
|
||||
std::pair<count_copies const, count_copies> move_source;
|
||||
reset();
|
||||
x.emplace(boost::unordered::piecewise_construct,
|
||||
x.emplace(std::piecewise_construct,
|
||||
std::make_tuple(std::move(move_source.first)),
|
||||
std::make_tuple(std::move(move_source.second)));
|
||||
COPY_COUNT(tuple_copy_cost);
|
||||
@@ -569,7 +569,7 @@ namespace unnecessary_copy_tests {
|
||||
!(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ < 6) && \
|
||||
!(defined(BOOST_MSVC) && BOOST_MSVC < 1700)
|
||||
reset();
|
||||
x.emplace(boost::unordered::piecewise_construct,
|
||||
x.emplace(std::piecewise_construct,
|
||||
std::forward_as_tuple(b.first), std::forward_as_tuple(b.second));
|
||||
COPY_COUNT(0);
|
||||
MOVE_COUNT(0);
|
||||
|
||||
Reference in New Issue
Block a user