2014-12-28 03:19:21 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// (C) Copyright Ion Gaztanaga 2005-2014. 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)
|
|
|
|
//
|
|
|
|
// See http://www.boost.org/libs/container for documentation.
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
|
|
|
|
#define BOOST_CONTAINER_CONTAINER_FWD_HPP
|
|
|
|
|
2015-08-16 23:45:50 +00:00
|
|
|
#ifndef BOOST_CONFIG_HPP
|
|
|
|
# include <boost/config.hpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
2014-12-28 03:19:21 +00:00
|
|
|
# pragma once
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//! \file
|
|
|
|
//! This header file forward declares the following containers:
|
|
|
|
//! - boost::container::vector
|
|
|
|
//! - boost::container::stable_vector
|
|
|
|
//! - boost::container::static_vector
|
2019-08-24 13:39:04 +00:00
|
|
|
//! - boost::container::small_vector_base
|
2017-03-13 04:29:07 +00:00
|
|
|
//! - boost::container::small_vector
|
2014-12-28 03:19:21 +00:00
|
|
|
//! - boost::container::slist
|
|
|
|
//! - boost::container::list
|
|
|
|
//! - boost::container::set
|
|
|
|
//! - boost::container::multiset
|
|
|
|
//! - boost::container::map
|
|
|
|
//! - boost::container::multimap
|
|
|
|
//! - boost::container::flat_set
|
|
|
|
//! - boost::container::flat_multiset
|
|
|
|
//! - boost::container::flat_map
|
|
|
|
//! - boost::container::flat_multimap
|
|
|
|
//! - boost::container::basic_string
|
|
|
|
//! - boost::container::string
|
|
|
|
//! - boost::container::wstring
|
|
|
|
//!
|
2017-03-13 04:29:07 +00:00
|
|
|
//! Forward declares the following allocators:
|
2014-12-28 03:19:21 +00:00
|
|
|
//! - boost::container::allocator
|
|
|
|
//! - boost::container::node_allocator
|
|
|
|
//! - boost::container::adaptive_pool
|
|
|
|
//!
|
2017-03-13 04:29:07 +00:00
|
|
|
//! Forward declares the following polymorphic resource classes:
|
|
|
|
//! - boost::container::pmr::memory_resource
|
|
|
|
//! - boost::container::pmr::polymorphic_allocator
|
|
|
|
//! - boost::container::pmr::monotonic_buffer_resource
|
|
|
|
//! - boost::container::pmr::pool_options
|
|
|
|
//! - boost::container::pmr::unsynchronized_pool_resource
|
|
|
|
//! - boost::container::pmr::synchronized_pool_resource
|
|
|
|
//!
|
2014-12-28 03:19:21 +00:00
|
|
|
//! And finally it defines the following types
|
|
|
|
|
|
|
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
|
|
|
|
|
|
|
//Std forward declarations
|
|
|
|
#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
|
|
|
|
#include <boost/container/detail/std_fwd.hpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace boost{
|
|
|
|
namespace intrusive{
|
2017-03-13 04:29:07 +00:00
|
|
|
namespace detail{
|
2014-12-28 03:19:21 +00:00
|
|
|
//Create namespace to avoid compilation errors
|
2017-03-13 04:29:07 +00:00
|
|
|
}}}
|
2014-12-28 03:19:21 +00:00
|
|
|
|
2018-08-21 16:04:16 +00:00
|
|
|
namespace boost{ namespace container{ namespace dtl{
|
2014-12-28 03:19:21 +00:00
|
|
|
namespace bi = boost::intrusive;
|
2017-03-13 04:29:07 +00:00
|
|
|
namespace bid = boost::intrusive::detail;
|
|
|
|
}}}
|
|
|
|
|
|
|
|
namespace boost{ namespace container{ namespace pmr{
|
|
|
|
namespace bi = boost::intrusive;
|
|
|
|
namespace bid = boost::intrusive::detail;
|
2014-12-28 03:19:21 +00:00
|
|
|
}}}
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
|
|
|
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Containers
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
namespace boost {
|
|
|
|
namespace container {
|
|
|
|
|
|
|
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
|
|
|
|
2019-08-24 13:39:04 +00:00
|
|
|
template<class T1, class T2>
|
|
|
|
struct pair;
|
|
|
|
|
2015-08-16 23:45:50 +00:00
|
|
|
template<class T>
|
|
|
|
class new_allocator;
|
|
|
|
|
2014-12-28 03:19:21 +00:00
|
|
|
template <class T
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void
|
|
|
|
,class Options = void>
|
2014-12-28 03:19:21 +00:00
|
|
|
class vector;
|
|
|
|
|
|
|
|
template <class T
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class stable_vector;
|
|
|
|
|
2019-08-24 13:39:04 +00:00
|
|
|
template < class T
|
|
|
|
, std::size_t Capacity
|
|
|
|
, class Options = void>
|
2014-12-28 03:19:21 +00:00
|
|
|
class static_vector;
|
|
|
|
|
2019-08-24 13:39:04 +00:00
|
|
|
template < class T
|
|
|
|
, class Allocator = void
|
|
|
|
, class Options = void >
|
|
|
|
class small_vector_base;
|
|
|
|
|
|
|
|
template < class T
|
|
|
|
, std::size_t N
|
|
|
|
, class Allocator = void
|
|
|
|
, class Options = void >
|
2015-08-16 23:45:50 +00:00
|
|
|
class small_vector;
|
|
|
|
|
2014-12-28 03:19:21 +00:00
|
|
|
template <class T
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void
|
|
|
|
,class Options = void>
|
2014-12-28 03:19:21 +00:00
|
|
|
class deque;
|
|
|
|
|
|
|
|
template <class T
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class list;
|
|
|
|
|
|
|
|
template <class T
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class slist;
|
|
|
|
|
|
|
|
template <class Key
|
|
|
|
,class Compare = std::less<Key>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void
|
2018-08-21 16:04:16 +00:00
|
|
|
,class Options = void>
|
2014-12-28 03:19:21 +00:00
|
|
|
class set;
|
|
|
|
|
|
|
|
template <class Key
|
|
|
|
,class Compare = std::less<Key>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void
|
2018-08-21 16:04:16 +00:00
|
|
|
,class Options = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class multiset;
|
|
|
|
|
|
|
|
template <class Key
|
|
|
|
,class T
|
|
|
|
,class Compare = std::less<Key>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void
|
2018-08-21 16:04:16 +00:00
|
|
|
,class Options = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class map;
|
|
|
|
|
|
|
|
template <class Key
|
|
|
|
,class T
|
|
|
|
,class Compare = std::less<Key>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void
|
2018-08-21 16:04:16 +00:00
|
|
|
,class Options = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class multimap;
|
|
|
|
|
|
|
|
template <class Key
|
|
|
|
,class Compare = std::less<Key>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class flat_set;
|
|
|
|
|
|
|
|
template <class Key
|
|
|
|
,class Compare = std::less<Key>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class flat_multiset;
|
|
|
|
|
|
|
|
template <class Key
|
|
|
|
,class T
|
|
|
|
,class Compare = std::less<Key>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class flat_map;
|
|
|
|
|
|
|
|
template <class Key
|
|
|
|
,class T
|
|
|
|
,class Compare = std::less<Key>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class flat_multimap;
|
|
|
|
|
|
|
|
template <class CharT
|
|
|
|
,class Traits = std::char_traits<CharT>
|
2019-08-24 13:39:04 +00:00
|
|
|
,class Allocator = void >
|
2014-12-28 03:19:21 +00:00
|
|
|
class basic_string;
|
|
|
|
|
2019-08-24 13:39:04 +00:00
|
|
|
typedef basic_string <char> string;
|
|
|
|
typedef basic_string<wchar_t> wstring;
|
2014-12-28 03:19:21 +00:00
|
|
|
|
|
|
|
static const std::size_t ADP_nodes_per_block = 256u;
|
|
|
|
static const std::size_t ADP_max_free_blocks = 2u;
|
|
|
|
static const std::size_t ADP_overhead_percent = 1u;
|
|
|
|
static const std::size_t ADP_only_alignment = 0u;
|
|
|
|
|
|
|
|
template < class T
|
|
|
|
, std::size_t NodesPerBlock = ADP_nodes_per_block
|
|
|
|
, std::size_t MaxFreeBlocks = ADP_max_free_blocks
|
|
|
|
, std::size_t OverheadPercent = ADP_overhead_percent
|
|
|
|
, unsigned Version = 2
|
|
|
|
>
|
|
|
|
class adaptive_pool;
|
|
|
|
|
|
|
|
template < class T
|
|
|
|
, unsigned Version = 2
|
|
|
|
, unsigned int AllocationDisableMask = 0>
|
|
|
|
class allocator;
|
|
|
|
|
|
|
|
static const std::size_t NodeAlloc_nodes_per_block = 256u;
|
|
|
|
|
|
|
|
template
|
|
|
|
< class T
|
|
|
|
, std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
|
|
|
|
, std::size_t Version = 2>
|
|
|
|
class node_allocator;
|
|
|
|
|
2017-03-13 04:29:07 +00:00
|
|
|
namespace pmr {
|
|
|
|
|
|
|
|
class memory_resource;
|
|
|
|
|
|
|
|
template<class T>
|
|
|
|
class polymorphic_allocator;
|
|
|
|
|
|
|
|
class monotonic_buffer_resource;
|
|
|
|
|
|
|
|
struct pool_options;
|
|
|
|
|
|
|
|
template <class Allocator>
|
|
|
|
class resource_adaptor_imp;
|
|
|
|
|
|
|
|
class unsynchronized_pool_resource;
|
|
|
|
|
|
|
|
class synchronized_pool_resource;
|
|
|
|
|
|
|
|
} //namespace pmr {
|
|
|
|
|
2014-12-28 03:19:21 +00:00
|
|
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
|
|
|
|
|
|
|
//! Type used to tag that the input range is
|
|
|
|
//! guaranteed to be ordered
|
|
|
|
struct ordered_range_t
|
|
|
|
{};
|
|
|
|
|
|
|
|
//! Value used to tag that the input range is
|
|
|
|
//! guaranteed to be ordered
|
|
|
|
static const ordered_range_t ordered_range = ordered_range_t();
|
|
|
|
|
|
|
|
//! Type used to tag that the input range is
|
|
|
|
//! guaranteed to be ordered and unique
|
|
|
|
struct ordered_unique_range_t
|
|
|
|
: public ordered_range_t
|
|
|
|
{};
|
|
|
|
|
|
|
|
//! Value used to tag that the input range is
|
|
|
|
//! guaranteed to be ordered and unique
|
|
|
|
static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
|
|
|
|
|
|
|
|
//! Type used to tag that the inserted values
|
|
|
|
//! should be default initialized
|
|
|
|
struct default_init_t
|
|
|
|
{};
|
|
|
|
|
|
|
|
//! Value used to tag that the inserted values
|
|
|
|
//! should be default initialized
|
|
|
|
static const default_init_t default_init = default_init_t();
|
|
|
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
|
|
|
|
|
|
|
//! Type used to tag that the inserted values
|
|
|
|
//! should be value initialized
|
|
|
|
struct value_init_t
|
|
|
|
{};
|
|
|
|
|
|
|
|
//! Value used to tag that the inserted values
|
|
|
|
//! should be value initialized
|
|
|
|
static const value_init_t value_init = value_init_t();
|
|
|
|
|
|
|
|
namespace container_detail_really_deep_namespace {
|
|
|
|
|
|
|
|
//Otherwise, gcc issues a warning of previously defined
|
|
|
|
//anonymous_instance and unique_instance
|
|
|
|
struct dummy
|
|
|
|
{
|
|
|
|
dummy()
|
|
|
|
{
|
|
|
|
(void)ordered_range;
|
|
|
|
(void)ordered_unique_range;
|
|
|
|
(void)default_init;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
} //detail_really_deep_namespace {
|
|
|
|
|
|
|
|
|
|
|
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
|
|
|
|
|
|
|
}} //namespace boost { namespace container {
|
|
|
|
|
|
|
|
#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
|