1//////////////////////////////////////////////////////////////////////////////
2//
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)
6//
7// See http://www.boost.org/libs/container for documentation.
8//
9//////////////////////////////////////////////////////////////////////////////
10
11#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
12#define BOOST_CONTAINER_CONTAINER_FWD_HPP
13
14#ifndef BOOST_CONFIG_HPP
15# include <boost/config.hpp>
16#endif
17
18#if defined(BOOST_HAS_PRAGMA_ONCE)
19# pragma once
20#endif
21
22//! \file
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
42//!
43//! Forward declares the following allocators:
44//! - boost::container::allocator
45//! - boost::container::node_allocator
46//! - boost::container::adaptive_pool
47//!
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
55//!
56//! And finally it defines the following types
57
58#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
59
60//Std forward declarations
61#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
62 #include <boost/container/detail/std_fwd.hpp>
63#endif
64
65namespace boost{
66namespace intrusive{
67namespace detail{
68 //Create namespace to avoid compilation errors
69}}}
70
71namespace boost{ namespace container{ namespace dtl{
72 namespace bi = boost::intrusive;
73 namespace bid = boost::intrusive::detail;
74}}}
75
76namespace boost{ namespace container{ namespace pmr{
77 namespace bi = boost::intrusive;
78 namespace bid = boost::intrusive::detail;
79}}}
80
81#include <cstddef>
82
83#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
84
85//////////////////////////////////////////////////////////////////////////////
86// Containers
87//////////////////////////////////////////////////////////////////////////////
88
89namespace boost {
90namespace container {
91
92#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
93
94template<class T1, class T2>
95struct pair;
96
97template<class T>
98class new_allocator;
99
100template <class T
101 ,class Allocator = void
102 ,class Options = void>
103class vector;
104
105template <class T
106 ,class Allocator = void >
107class stable_vector;
108
109template < class T
110 , std::size_t Capacity
111 , class Options = void>
112class static_vector;
113
114template < class T
115 , class Allocator = void
116 , class Options = void >
117class small_vector_base;
118
119template < class T
120 , std::size_t N
121 , class Allocator = void
122 , class Options = void >
123class small_vector;
124
125template <class T
126 ,class Allocator = void
127 ,class Options = void>
128class deque;
129
130template <class T
131 ,class Allocator = void >
132class list;
133
134template <class T
135 ,class Allocator = void >
136class slist;
137
138template <class Key
139 ,class Compare = std::less<Key>
140 ,class Allocator = void
141 ,class Options = void>
142class set;
143
144template <class Key
145 ,class Compare = std::less<Key>
146 ,class Allocator = void
147 ,class Options = void >
148class multiset;
149
150template <class Key
151 ,class T
152 ,class Compare = std::less<Key>
153 ,class Allocator = void
154 ,class Options = void >
155class map;
156
157template <class Key
158 ,class T
159 ,class Compare = std::less<Key>
160 ,class Allocator = void
161 ,class Options = void >
162class multimap;
163
164template <class Key
165 ,class Compare = std::less<Key>
166 ,class Allocator = void >
167class flat_set;
168
169template <class Key
170 ,class Compare = std::less<Key>
171 ,class Allocator = void >
172class flat_multiset;
173
174template <class Key
175 ,class T
176 ,class Compare = std::less<Key>
177 ,class Allocator = void >
178class flat_map;
179
180template <class Key
181 ,class T
182 ,class Compare = std::less<Key>
183 ,class Allocator = void >
184class flat_multimap;
185
186#ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
187
188//! Alias templates for small_flat_[multi]{set|map} using small_vector as container
189
190template < class Key
191 , std::size_t N
192 , class Compare = std::less<Key>
193 , class SmallVectorAllocator = void
194 , class SmallVectorOptions = void >
195using small_flat_set = flat_set<Key, Compare, small_vector<Key, N, SmallVectorAllocator, SmallVectorOptions>>;
196
197template < class Key
198 , std::size_t N
199 , class Compare = std::less<Key>
200 , class SmallVectorAllocator = void
201 , class SmallVectorOptions = void >
202using small_flat_multiset = flat_multiset<Key, Compare, small_vector<Key, N, SmallVectorAllocator, SmallVectorOptions>>;
203
204template < class Key
205 , class T
206 , std::size_t N
207 , class Compare = std::less<Key>
208 , class SmallVectorAllocator = void
209 , class SmallVectorOptions = void >
210using small_flat_map = flat_map<Key, T, Compare, small_vector<std::pair<Key, T>, N, SmallVectorAllocator, SmallVectorOptions>>;
211
212template < class Key
213 , class T
214 , std::size_t N
215 , class Compare = std::less<Key>
216 , class SmallVectorAllocator = void
217 , class SmallVectorOptions = void >
218using small_flat_multimap = flat_multimap<Key, T, Compare, small_vector<std::pair<Key, T>, N, SmallVectorAllocator, SmallVectorOptions>>;
219
220#endif // #ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
221
222
223//! A portable metafunction to obtain a small_flat_set
224template < class Key
225 , std::size_t N
226 , class Compare = std::less<Key>
227 , class SmallVectorAllocator = void
228 , class SmallVectorOptions = void >
229struct small_flat_set_of
230{
231 typedef flat_set<Key, Compare, small_vector<Key, N, SmallVectorAllocator, SmallVectorOptions> > type;
232};
233
234//! A portable metafunction to obtain a small_flat_multiset
235template < class Key
236 , std::size_t N
237 , class Compare = std::less<Key>
238 , class SmallVectorAllocator = void
239 , class SmallVectorOptions = void >
240struct small_flat_multiset_of
241{
242 typedef flat_multiset<Key, Compare, small_vector<Key, N, SmallVectorAllocator, SmallVectorOptions> > type;
243};
244
245//! A portable metafunction to obtain a small_flat_map
246template < class Key
247 , class T
248 , std::size_t N
249 , class Compare = std::less<Key>
250 , class SmallVectorAllocator = void
251 , class SmallVectorOptions = void >
252struct small_flat_map_of
253{
254 typedef flat_map<Key, T, Compare, small_vector<std::pair<Key, T>, N, SmallVectorAllocator, SmallVectorOptions> > type;
255};
256
257//! A portable metafunction to obtain a small_flat_multimap
258template < class Key
259 , class T
260 , std::size_t N
261 , class Compare = std::less<Key>
262 , class SmallVectorAllocator = void
263 , class SmallVectorOptions = void >
264struct small_flat_multimap_of
265{
266 typedef flat_multimap<Key, T, Compare, small_vector<std::pair<Key, T>, N, SmallVectorAllocator, SmallVectorOptions> > type;
267};
268
269template <class CharT
270 ,class Traits = std::char_traits<CharT>
271 ,class Allocator = void >
272class basic_string;
273
274typedef basic_string <char> string;
275typedef basic_string<wchar_t> wstring;
276
277static const std::size_t ADP_nodes_per_block = 256u;
278static const std::size_t ADP_max_free_blocks = 2u;
279static const std::size_t ADP_overhead_percent = 1u;
280static const std::size_t ADP_only_alignment = 0u;
281
282template < class T
283 , std::size_t NodesPerBlock = ADP_nodes_per_block
284 , std::size_t MaxFreeBlocks = ADP_max_free_blocks
285 , std::size_t OverheadPercent = ADP_overhead_percent
286 , unsigned Version = 2
287 >
288class adaptive_pool;
289
290template < class T
291 , unsigned Version = 2
292 , unsigned int AllocationDisableMask = 0>
293class allocator;
294
295static const std::size_t NodeAlloc_nodes_per_block = 256u;
296
297template
298 < class T
299 , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
300 , std::size_t Version = 2>
301class node_allocator;
302
303namespace pmr {
304
305class memory_resource;
306
307template<class T>
308class polymorphic_allocator;
309
310class monotonic_buffer_resource;
311
312struct pool_options;
313
314template <class Allocator>
315class resource_adaptor_imp;
316
317class unsynchronized_pool_resource;
318
319class synchronized_pool_resource;
320
321} //namespace pmr {
322
323#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
324
325//! Type used to tag that the input range is
326//! guaranteed to be ordered
327struct ordered_range_t
328{};
329
330//! Value used to tag that the input range is
331//! guaranteed to be ordered
332static const ordered_range_t ordered_range = ordered_range_t();
333
334//! Type used to tag that the input range is
335//! guaranteed to be ordered and unique
336struct ordered_unique_range_t
337 : public ordered_range_t
338{};
339
340//! Value used to tag that the input range is
341//! guaranteed to be ordered and unique
342static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
343
344//! Type used to tag that the inserted values
345//! should be default initialized
346struct default_init_t
347{};
348
349//! Value used to tag that the inserted values
350//! should be default initialized
351static const default_init_t default_init = default_init_t();
352#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
353
354//! Type used to tag that the inserted values
355//! should be value initialized
356struct value_init_t
357{};
358
359//! Value used to tag that the inserted values
360//! should be value initialized
361static const value_init_t value_init = value_init_t();
362
363namespace container_detail_really_deep_namespace {
364
365//Otherwise, gcc issues a warning of previously defined
366//anonymous_instance and unique_instance
367struct dummy
368{
369 dummy()
370 {
371 (void)ordered_range;
372 (void)ordered_unique_range;
373 (void)default_init;
374 }
375};
376
377} //detail_really_deep_namespace {
378
379
380#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
381
382}} //namespace boost { namespace container {
383
384#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
385

source code of include/boost/container/container_fwd.hpp