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 
65 namespace boost{
66 namespace intrusive{
67 namespace detail{
68    //Create namespace to avoid compilation errors
69 }}}
70 
71 namespace boost{ namespace container{ namespace dtl{
72    namespace bi = boost::intrusive;
73    namespace bid = boost::intrusive::detail;
74 }}}
75 
76 namespace 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 
89 namespace boost {
90 namespace container {
91 
92 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
93 
94 template<class T1, class T2>
95 struct pair;
96 
97 template<class T>
98 class new_allocator;
99 
100 template <class T
101          ,class Allocator = void
102          ,class Options   = void>
103 class vector;
104 
105 template <class T
106          ,class Allocator = void >
107 class stable_vector;
108 
109 template < class T
110          , std::size_t Capacity
111          , class Options = void>
112 class static_vector;
113 
114 template < class T
115          , class Allocator = void
116          , class Options   = void >
117 class small_vector_base;
118 
119 template < class T
120          , std::size_t N
121          , class Allocator = void
122          , class Options   = void  >
123 class small_vector;
124 
125 template <class T
126          ,class Allocator = void
127          ,class Options   = void>
128 class deque;
129 
130 template <class T
131          ,class Allocator = void >
132 class list;
133 
134 template <class T
135          ,class Allocator = void >
136 class slist;
137 
138 template <class Key
139          ,class Compare  = std::less<Key>
140          ,class Allocator = void
141          ,class Options = void>
142 class set;
143 
144 template <class Key
145          ,class Compare  = std::less<Key>
146          ,class Allocator = void
147          ,class Options = void >
148 class multiset;
149 
150 template <class Key
151          ,class T
152          ,class Compare  = std::less<Key>
153          ,class Allocator = void
154          ,class Options = void >
155 class map;
156 
157 template <class Key
158          ,class T
159          ,class Compare  = std::less<Key>
160          ,class Allocator = void
161          ,class Options = void >
162 class multimap;
163 
164 template <class Key
165          ,class Compare  = std::less<Key>
166          ,class Allocator = void >
167 class flat_set;
168 
169 template <class Key
170          ,class Compare  = std::less<Key>
171          ,class Allocator = void >
172 class flat_multiset;
173 
174 template <class Key
175          ,class T
176          ,class Compare  = std::less<Key>
177          ,class Allocator = void >
178 class flat_map;
179 
180 template <class Key
181          ,class T
182          ,class Compare  = std::less<Key>
183          ,class Allocator = void >
184 class flat_multimap;
185 
186 template <class CharT
187          ,class Traits = std::char_traits<CharT>
188          ,class Allocator  = void >
189 class basic_string;
190 
191 typedef basic_string <char>   string;
192 typedef basic_string<wchar_t> wstring;
193 
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;
198 
199 template < class T
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
204          >
205 class adaptive_pool;
206 
207 template < class T
208          , unsigned Version = 2
209          , unsigned int AllocationDisableMask = 0>
210 class allocator;
211 
212 static const std::size_t NodeAlloc_nodes_per_block = 256u;
213 
214 template
215    < class T
216    , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
217    , std::size_t Version = 2>
218 class node_allocator;
219 
220 namespace pmr {
221 
222 class memory_resource;
223 
224 template<class T>
225 class polymorphic_allocator;
226 
227 class monotonic_buffer_resource;
228 
229 struct pool_options;
230 
231 template <class Allocator>
232 class resource_adaptor_imp;
233 
234 class unsynchronized_pool_resource;
235 
236 class synchronized_pool_resource;
237 
238 }  //namespace pmr {
239 
240 #endif   //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
241 
242 //! Type used to tag that the input range is
243 //! guaranteed to be ordered
244 struct ordered_range_t
245 {};
246 
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();
250 
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
255 {};
256 
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();
260 
261 //! Type used to tag that the inserted values
262 //! should be default initialized
263 struct default_init_t
264 {};
265 
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
270 
271 //! Type used to tag that the inserted values
272 //! should be value initialized
273 struct value_init_t
274 {};
275 
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();
279 
280 namespace container_detail_really_deep_namespace {
281 
282 //Otherwise, gcc issues a warning of previously defined
283 //anonymous_instance and unique_instance
284 struct dummy
285 {
dummyboost::container::container_detail_really_deep_namespace::dummy286    dummy()
287    {
288       (void)ordered_range;
289       (void)ordered_unique_range;
290       (void)default_init;
291    }
292 };
293 
294 }  //detail_really_deep_namespace {
295 
296 
297 #endif   //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
298 
299 }}  //namespace boost { namespace container {
300 
301 #endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
302