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