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
28//! - boost::container::slist
29//! - boost::container::list
30//! - boost::container::set
31//! - boost::container::multiset
32//! - boost::container::map
33//! - boost::container::multimap
34//! - boost::container::flat_set
35//! - boost::container::flat_multiset
36//! - boost::container::flat_map
37//! - boost::container::flat_multimap
38//! - boost::container::basic_string
39//! - boost::container::string
40//! - boost::container::wstring
41//!
42//! Forward declares the following allocators:
43//! - boost::container::allocator
44//! - boost::container::node_allocator
45//! - boost::container::adaptive_pool
46//!
47//! Forward declares the following polymorphic resource classes:
48//! - boost::container::pmr::memory_resource
49//! - boost::container::pmr::polymorphic_allocator
50//! - boost::container::pmr::monotonic_buffer_resource
51//! - boost::container::pmr::pool_options
52//! - boost::container::pmr::unsynchronized_pool_resource
53//! - boost::container::pmr::synchronized_pool_resource
54//!
55//! And finally it defines the following types
56
57#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
58
59//Std forward declarations
60#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
61 #include <boost/container/detail/std_fwd.hpp>
62#endif
63
64namespace boost{
65namespace intrusive{
66namespace detail{
67 //Create namespace to avoid compilation errors
68}}}
69
70namespace boost{ namespace container{ namespace container_detail{
71 namespace bi = boost::intrusive;
72 namespace bid = boost::intrusive::detail;
73}}}
74
75namespace boost{ namespace container{ namespace pmr{
76 namespace bi = boost::intrusive;
77 namespace bid = boost::intrusive::detail;
78}}}
79
80#include <cstddef>
81
82#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
83
84//////////////////////////////////////////////////////////////////////////////
85// Containers
86//////////////////////////////////////////////////////////////////////////////
87
88namespace boost {
89namespace container {
90
91//! Enumeration used to configure ordered associative containers
92//! with a concrete tree implementation.
93enum tree_type_enum
94{
95 red_black_tree,
96 avl_tree,
97 scapegoat_tree,
98 splay_tree
99};
100
101#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
102
103template<class T>
104class new_allocator;
105
106template <class T
107 ,class Allocator = new_allocator<T> >
108class vector;
109
110template <class T
111 ,class Allocator = new_allocator<T> >
112class stable_vector;
113
114template <class T, std::size_t Capacity>
115class static_vector;
116
117template < class T, std::size_t N
118 , class Allocator= new_allocator<T> >
119class small_vector;
120
121template <class T
122 ,class Allocator = new_allocator<T> >
123class deque;
124
125template <class T
126 ,class Allocator = new_allocator<T> >
127class list;
128
129template <class T
130 ,class Allocator = new_allocator<T> >
131class slist;
132
133template<tree_type_enum TreeType, bool OptimizeSize>
134struct tree_opt;
135
136typedef tree_opt<red_black_tree, true> tree_assoc_defaults;
137
138template <class Key
139 ,class Compare = std::less<Key>
140 ,class Allocator = new_allocator<Key>
141 ,class Options = tree_assoc_defaults >
142class set;
143
144template <class Key
145 ,class Compare = std::less<Key>
146 ,class Allocator = new_allocator<Key>
147 ,class Options = tree_assoc_defaults >
148class multiset;
149
150template <class Key
151 ,class T
152 ,class Compare = std::less<Key>
153 ,class Allocator = new_allocator<std::pair<const Key, T> >
154 ,class Options = tree_assoc_defaults >
155class map;
156
157template <class Key
158 ,class T
159 ,class Compare = std::less<Key>
160 ,class Allocator = new_allocator<std::pair<const Key, T> >
161 ,class Options = tree_assoc_defaults >
162class multimap;
163
164template <class Key
165 ,class Compare = std::less<Key>
166 ,class Allocator = new_allocator<Key> >
167class flat_set;
168
169template <class Key
170 ,class Compare = std::less<Key>
171 ,class Allocator = new_allocator<Key> >
172class flat_multiset;
173
174template <class Key
175 ,class T
176 ,class Compare = std::less<Key>
177 ,class Allocator = new_allocator<std::pair<Key, T> > >
178class flat_map;
179
180template <class Key
181 ,class T
182 ,class Compare = std::less<Key>
183 ,class Allocator = new_allocator<std::pair<Key, T> > >
184class flat_multimap;
185
186template <class CharT
187 ,class Traits = std::char_traits<CharT>
188 ,class Allocator = new_allocator<CharT> >
189class basic_string;
190
191typedef basic_string
192 <char
193 ,std::char_traits<char>
194 ,new_allocator<char> >
195string;
196
197typedef basic_string
198 <wchar_t
199 ,std::char_traits<wchar_t>
200 ,new_allocator<wchar_t> >
201wstring;
202
203static const std::size_t ADP_nodes_per_block = 256u;
204static const std::size_t ADP_max_free_blocks = 2u;
205static const std::size_t ADP_overhead_percent = 1u;
206static const std::size_t ADP_only_alignment = 0u;
207
208template < class T
209 , std::size_t NodesPerBlock = ADP_nodes_per_block
210 , std::size_t MaxFreeBlocks = ADP_max_free_blocks
211 , std::size_t OverheadPercent = ADP_overhead_percent
212 , unsigned Version = 2
213 >
214class adaptive_pool;
215
216template < class T
217 , unsigned Version = 2
218 , unsigned int AllocationDisableMask = 0>
219class allocator;
220
221static const std::size_t NodeAlloc_nodes_per_block = 256u;
222
223template
224 < class T
225 , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
226 , std::size_t Version = 2>
227class node_allocator;
228
229namespace pmr {
230
231class memory_resource;
232
233template<class T>
234class polymorphic_allocator;
235
236class monotonic_buffer_resource;
237
238struct pool_options;
239
240template <class Allocator>
241class resource_adaptor_imp;
242
243class unsynchronized_pool_resource;
244
245class synchronized_pool_resource;
246
247} //namespace pmr {
248
249#else
250
251//! Default options for tree-based associative containers
252//! - tree_type<red_black_tree>
253//! - optimize_size<true>
254typedef implementation_defined tree_assoc_defaults;
255
256#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
257
258//! Type used to tag that the input range is
259//! guaranteed to be ordered
260struct ordered_range_t
261{};
262
263//! Value used to tag that the input range is
264//! guaranteed to be ordered
265static const ordered_range_t ordered_range = ordered_range_t();
266
267//! Type used to tag that the input range is
268//! guaranteed to be ordered and unique
269struct ordered_unique_range_t
270 : public ordered_range_t
271{};
272
273//! Value used to tag that the input range is
274//! guaranteed to be ordered and unique
275static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
276
277//! Type used to tag that the inserted values
278//! should be default initialized
279struct default_init_t
280{};
281
282//! Value used to tag that the inserted values
283//! should be default initialized
284static const default_init_t default_init = default_init_t();
285#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
286
287//! Type used to tag that the inserted values
288//! should be value initialized
289struct value_init_t
290{};
291
292//! Value used to tag that the inserted values
293//! should be value initialized
294static const value_init_t value_init = value_init_t();
295
296namespace container_detail_really_deep_namespace {
297
298//Otherwise, gcc issues a warning of previously defined
299//anonymous_instance and unique_instance
300struct dummy
301{
302 dummy()
303 {
304 (void)ordered_range;
305 (void)ordered_unique_range;
306 (void)default_init;
307 }
308};
309
310} //detail_really_deep_namespace {
311
312
313#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
314
315}} //namespace boost { namespace container {
316
317#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
318

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