1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2005-2014. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/libs/container for documentation.
9 //////////////////////////////////////////////////////////////////////////////
11 #ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
12 #define BOOST_CONTAINER_CONTAINER_FWD_HPP
14 #ifndef BOOST_CONFIG_HPP
15 # include <boost/config.hpp>
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
23 //! This header file forward declares the following containers:
24 //! - boost::container::vector
25 //! - boost::container::stable_vector
26 //! - boost::container::static_vector
27 //! - boost::container::small_vector_base
28 //! - boost::container::small_vector
29 //! - boost::container::slist
30 //! - boost::container::list
31 //! - boost::container::set
32 //! - boost::container::multiset
33 //! - boost::container::map
34 //! - boost::container::multimap
35 //! - boost::container::flat_set
36 //! - boost::container::flat_multiset
37 //! - boost::container::flat_map
38 //! - boost::container::flat_multimap
39 //! - boost::container::basic_string
40 //! - boost::container::string
41 //! - boost::container::wstring
43 //! Forward declares the following allocators:
44 //! - boost::container::allocator
45 //! - boost::container::node_allocator
46 //! - boost::container::adaptive_pool
48 //! Forward declares the following polymorphic resource classes:
49 //! - boost::container::pmr::memory_resource
50 //! - boost::container::pmr::polymorphic_allocator
51 //! - boost::container::pmr::monotonic_buffer_resource
52 //! - boost::container::pmr::pool_options
53 //! - boost::container::pmr::unsynchronized_pool_resource
54 //! - boost::container::pmr::synchronized_pool_resource
56 //! And finally it defines the following types
58 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
60 //Std forward declarations
61 #ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
62 #include <boost/container/detail/std_fwd.hpp>
68 //Create namespace to avoid compilation errors
71 namespace boost{ namespace container{ namespace dtl{
72 namespace bi = boost::intrusive;
73 namespace bid = boost::intrusive::detail;
76 namespace boost{ namespace container{ namespace pmr{
77 namespace bi = boost::intrusive;
78 namespace bid = boost::intrusive::detail;
83 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
85 //////////////////////////////////////////////////////////////////////////////
87 //////////////////////////////////////////////////////////////////////////////
92 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
94 template<class T1, class T2>
101 ,class Allocator = void
102 ,class Options = void>
106 ,class Allocator = void >
110 , std::size_t Capacity
111 , class Options = void>
115 , class Allocator = void
116 , class Options = void >
117 class small_vector_base;
121 , class Allocator = void
122 , class Options = void >
126 ,class Allocator = void
127 ,class Options = void>
131 ,class Allocator = void >
135 ,class Allocator = void >
139 ,class Compare = std::less<Key>
140 ,class Allocator = void
141 ,class Options = void>
145 ,class Compare = std::less<Key>
146 ,class Allocator = void
147 ,class Options = void >
152 ,class Compare = std::less<Key>
153 ,class Allocator = void
154 ,class Options = void >
159 ,class Compare = std::less<Key>
160 ,class Allocator = void
161 ,class Options = void >
165 ,class Compare = std::less<Key>
166 ,class Allocator = void >
170 ,class Compare = std::less<Key>
171 ,class Allocator = void >
176 ,class Compare = std::less<Key>
177 ,class Allocator = void >
182 ,class Compare = std::less<Key>
183 ,class Allocator = void >
186 template <class CharT
187 ,class Traits = std::char_traits<CharT>
188 ,class Allocator = void >
191 typedef basic_string <char> string;
192 typedef basic_string<wchar_t> wstring;
194 static const std::size_t ADP_nodes_per_block = 256u;
195 static const std::size_t ADP_max_free_blocks = 2u;
196 static const std::size_t ADP_overhead_percent = 1u;
197 static const std::size_t ADP_only_alignment = 0u;
200 , std::size_t NodesPerBlock = ADP_nodes_per_block
201 , std::size_t MaxFreeBlocks = ADP_max_free_blocks
202 , std::size_t OverheadPercent = ADP_overhead_percent
203 , unsigned Version = 2
208 , unsigned Version = 2
209 , unsigned int AllocationDisableMask = 0>
212 static const std::size_t NodeAlloc_nodes_per_block = 256u;
216 , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
217 , std::size_t Version = 2>
218 class node_allocator;
222 class memory_resource;
225 class polymorphic_allocator;
227 class monotonic_buffer_resource;
231 template <class Allocator>
232 class resource_adaptor_imp;
234 class unsynchronized_pool_resource;
236 class synchronized_pool_resource;
240 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
242 //! Type used to tag that the input range is
243 //! guaranteed to be ordered
244 struct ordered_range_t
247 //! Value used to tag that the input range is
248 //! guaranteed to be ordered
249 static const ordered_range_t ordered_range = ordered_range_t();
251 //! Type used to tag that the input range is
252 //! guaranteed to be ordered and unique
253 struct ordered_unique_range_t
254 : public ordered_range_t
257 //! Value used to tag that the input range is
258 //! guaranteed to be ordered and unique
259 static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
261 //! Type used to tag that the inserted values
262 //! should be default initialized
263 struct default_init_t
266 //! Value used to tag that the inserted values
267 //! should be default initialized
268 static const default_init_t default_init = default_init_t();
269 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
271 //! Type used to tag that the inserted values
272 //! should be value initialized
276 //! Value used to tag that the inserted values
277 //! should be value initialized
278 static const value_init_t value_init = value_init_t();
280 namespace container_detail_really_deep_namespace {
282 //Otherwise, gcc issues a warning of previously defined
283 //anonymous_instance and unique_instance
289 (void)ordered_unique_range;
294 } //detail_really_deep_namespace {
297 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
299 }} //namespace boost { namespace container {
301 #endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP