forked from boostorg/unordered
Relocate piecewise_construct to impl file, remove unnecessary fwd header
This commit is contained in:
@ -1,46 +0,0 @@
|
|||||||
|
|
||||||
// Copyright (C) 2008-2016 Daniel James.
|
|
||||||
// Copyright (C) 2022 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)
|
|
||||||
|
|
||||||
#ifndef BOOST_UNORDERED_FWD_HPP_INCLUDED
|
|
||||||
#define BOOST_UNORDERED_FWD_HPP_INCLUDED
|
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
|
||||||
#pragma once
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <boost/predef.h>
|
|
||||||
|
|
||||||
#include <utility>
|
|
||||||
#include <tuple>
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Configuration
|
|
||||||
//
|
|
||||||
// Unless documented elsewhere these configuration macros should be considered
|
|
||||||
// an implementation detail, I'll try not to break them, but you never know.
|
|
||||||
|
|
||||||
// Use Sun C++ workarounds
|
|
||||||
// I'm not sure which versions of the compiler require these workarounds, so
|
|
||||||
// I'm just using them of everything older than the current test compilers
|
|
||||||
// (as of May 2017).
|
|
||||||
|
|
||||||
#if !defined(BOOST_UNORDERED_SUN_WORKAROUNDS1)
|
|
||||||
#if BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 20, 0)
|
|
||||||
#define BOOST_UNORDERED_SUN_WORKAROUNDS1 1
|
|
||||||
#else
|
|
||||||
#define BOOST_UNORDERED_SUN_WORKAROUNDS1 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace boost {
|
|
||||||
namespace unordered {
|
|
||||||
using std::piecewise_construct;
|
|
||||||
using std::piecewise_construct_t;
|
|
||||||
} // namespace unordered
|
|
||||||
} // namespace boost
|
|
||||||
|
|
||||||
#endif
|
|
@ -15,7 +15,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/unordered/detail/fca.hpp>
|
#include <boost/unordered/detail/fca.hpp>
|
||||||
#include <boost/unordered/detail/fwd.hpp>
|
|
||||||
#include <boost/unordered/detail/opt_storage.hpp>
|
#include <boost/unordered/detail/opt_storage.hpp>
|
||||||
#include <boost/unordered/detail/serialize_tracked_address.hpp>
|
#include <boost/unordered/detail/serialize_tracked_address.hpp>
|
||||||
#include <boost/unordered/detail/static_assert.hpp>
|
#include <boost/unordered/detail/static_assert.hpp>
|
||||||
@ -80,6 +79,10 @@ namespace boost {
|
|||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace unordered {
|
namespace unordered {
|
||||||
|
|
||||||
|
using std::piecewise_construct;
|
||||||
|
using std::piecewise_construct_t;
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
template <typename Types> struct table;
|
template <typename Types> struct table;
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/preprocessor/cat.hpp>
|
#include <boost/preprocessor/cat.hpp>
|
||||||
#include <boost/preprocessor/stringize.hpp>
|
#include <boost/preprocessor/stringize.hpp>
|
||||||
#include <boost/unordered/detail/fwd.hpp>
|
|
||||||
|
|
||||||
#include <boost/type_traits/is_nothrow_move_assignable.hpp>
|
#include <boost/type_traits/is_nothrow_move_assignable.hpp>
|
||||||
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
|
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include <boost/unordered/unordered_node_map.hpp>
|
#include <boost/unordered/unordered_node_map.hpp>
|
||||||
#include <boost/unordered/unordered_node_set.hpp>
|
#include <boost/unordered/unordered_node_set.hpp>
|
||||||
#include <boost/unordered/detail/implementation.hpp>
|
#include <boost/unordered/detail/implementation.hpp>
|
||||||
#include <boost/unordered/detail/fwd.hpp>
|
|
||||||
#else
|
#else
|
||||||
#include <boost/unordered_set.hpp>
|
#include <boost/unordered_set.hpp>
|
||||||
#include <boost/unordered_map.hpp>
|
#include <boost/unordered_map.hpp>
|
||||||
|
@ -499,7 +499,6 @@ namespace insert_tests {
|
|||||||
|
|
||||||
template <class X> void default_emplace_tests(X*, test::random_generator)
|
template <class X> void default_emplace_tests(X*, test::random_generator)
|
||||||
{
|
{
|
||||||
#if !BOOST_UNORDERED_SUN_WORKAROUNDS1
|
|
||||||
bool is_unique = test::has_unique_keys<X>::value;
|
bool is_unique = test::has_unique_keys<X>::value;
|
||||||
|
|
||||||
X x;
|
X x;
|
||||||
@ -529,7 +528,6 @@ namespace insert_tests {
|
|||||||
|
|
||||||
BOOST_TEST(x.count(test::get_key<X>(y)) == (is_unique ? 1u : 2u));
|
BOOST_TEST(x.count(test::get_key<X>(y)) == (is_unique ? 1u : 2u));
|
||||||
BOOST_TEST(*x.equal_range(test::get_key<X>(y)).first == y);
|
BOOST_TEST(*x.equal_range(test::get_key<X>(y)).first == y);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class X> void map_tests(X*, test::random_generator generator)
|
template <class X> void map_tests(X*, test::random_generator generator)
|
||||||
@ -1229,11 +1227,9 @@ namespace insert_tests {
|
|||||||
template <class X> static void map_emplace_test(X*)
|
template <class X> static void map_emplace_test(X*)
|
||||||
{
|
{
|
||||||
X x;
|
X x;
|
||||||
#if !BOOST_UNORDERED_SUN_WORKAROUNDS1
|
|
||||||
x.emplace();
|
x.emplace();
|
||||||
BOOST_TEST(
|
BOOST_TEST(
|
||||||
x.find(0) != x.end() && x.find(0)->second == overloaded_constructor());
|
x.find(0) != x.end() && x.find(0)->second == overloaded_constructor());
|
||||||
#endif
|
|
||||||
|
|
||||||
x.emplace(2, 3);
|
x.emplace(2, 3);
|
||||||
BOOST_TEST(
|
BOOST_TEST(
|
||||||
@ -1248,11 +1244,9 @@ namespace insert_tests {
|
|||||||
template <class X> static void multimap_emplace_test(X*)
|
template <class X> static void multimap_emplace_test(X*)
|
||||||
{
|
{
|
||||||
X x;
|
X x;
|
||||||
#if !BOOST_UNORDERED_SUN_WORKAROUNDS1
|
|
||||||
x.emplace();
|
x.emplace();
|
||||||
BOOST_TEST(
|
BOOST_TEST(
|
||||||
x.find(0) != x.end() && x.find(0)->second == overloaded_constructor());
|
x.find(0) != x.end() && x.find(0)->second == overloaded_constructor());
|
||||||
#endif
|
|
||||||
|
|
||||||
x.emplace(2, 3);
|
x.emplace(2, 3);
|
||||||
BOOST_TEST(
|
BOOST_TEST(
|
||||||
@ -1292,10 +1286,8 @@ namespace insert_tests {
|
|||||||
X x;
|
X x;
|
||||||
overloaded_constructor check;
|
overloaded_constructor check;
|
||||||
|
|
||||||
#if !BOOST_UNORDERED_SUN_WORKAROUNDS1
|
|
||||||
x.emplace();
|
x.emplace();
|
||||||
BOOST_TEST(x.find(check) != x.end() && *x.find(check) == check);
|
BOOST_TEST(x.find(check) != x.end() && *x.find(check) == check);
|
||||||
#endif
|
|
||||||
|
|
||||||
x.clear();
|
x.clear();
|
||||||
x.emplace(1);
|
x.emplace(1);
|
||||||
|
@ -338,7 +338,6 @@ namespace unnecessary_copy_tests {
|
|||||||
// 0 arguments
|
// 0 arguments
|
||||||
//
|
//
|
||||||
|
|
||||||
#if !BOOST_UNORDERED_SUN_WORKAROUNDS1
|
|
||||||
// The container will have to create a copy in order to compare with
|
// The container will have to create a copy in order to compare with
|
||||||
// the existing element.
|
// the existing element.
|
||||||
reset();
|
reset();
|
||||||
@ -347,7 +346,6 @@ namespace unnecessary_copy_tests {
|
|||||||
// source_cost doesn't make much sense here, but it seems to fit.
|
// source_cost doesn't make much sense here, but it seems to fit.
|
||||||
COPY_COUNT(1);
|
COPY_COUNT(1);
|
||||||
MOVE_COUNT(source_cost);
|
MOVE_COUNT(source_cost);
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// 1 argument
|
// 1 argument
|
||||||
@ -426,7 +424,6 @@ namespace unnecessary_copy_tests {
|
|||||||
// 0 arguments
|
// 0 arguments
|
||||||
//
|
//
|
||||||
|
|
||||||
#if !BOOST_UNORDERED_SUN_WORKAROUNDS1
|
|
||||||
// COPY_COUNT(1) would be okay here.
|
// COPY_COUNT(1) would be okay here.
|
||||||
reset();
|
reset();
|
||||||
x.emplace();
|
x.emplace();
|
||||||
@ -441,7 +438,6 @@ namespace unnecessary_copy_tests {
|
|||||||
#else
|
#else
|
||||||
COPY_COUNT_EXTRA(2, 1);
|
COPY_COUNT_EXTRA(2, 1);
|
||||||
MOVE_COUNT_EXTRA(0, 1);
|
MOVE_COUNT_EXTRA(0, 1);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
|
Reference in New Issue
Block a user