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