1 //////////////////////////////////////////////////////////////////////////////
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)
7 // See http://www.boost.org/libs/container for documentation.
9 //////////////////////////////////////////////////////////////////////////////
11 #ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
12 #define BOOST_CONTAINER_CONTAINER_FWD_HPP
14 #ifndef BOOST_CONFIG_HPP
15 # include <boost/config.hpp>
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
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
42 //! Forward declares the following allocators:
43 //! - boost::container::allocator
44 //! - boost::container::node_allocator
45 //! - boost::container::adaptive_pool
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
55 //! And finally it defines the following types
57 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
59 //Std forward declarations
60 #ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
61 #include <boost/container/detail/std_fwd.hpp>
67 //Create namespace to avoid compilation errors
70 namespace boost{ namespace container{ namespace dtl{
71 namespace bi = boost::intrusive;
72 namespace bid = boost::intrusive::detail;
75 namespace boost{ namespace container{ namespace pmr{
76 namespace bi = boost::intrusive;
77 namespace bid = boost::intrusive::detail;
82 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
84 //////////////////////////////////////////////////////////////////////////////
86 //////////////////////////////////////////////////////////////////////////////
91 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
97 ,class Allocator = new_allocator<T>
98 ,class Options = void>
102 ,class Allocator = new_allocator<T> >
105 template <class T, std::size_t Capacity>
108 template < class T, std::size_t N
109 , class Allocator= new_allocator<T> >
113 ,class Allocator = new_allocator<T> >
117 ,class Allocator = new_allocator<T> >
121 ,class Allocator = new_allocator<T> >
125 ,class Compare = std::less<Key>
126 ,class Allocator = new_allocator<Key>
127 ,class Options = void>
131 ,class Compare = std::less<Key>
132 ,class Allocator = new_allocator<Key>
133 ,class Options = void >
138 ,class Compare = std::less<Key>
139 ,class Allocator = new_allocator<std::pair<const Key, T> >
140 ,class Options = void >
145 ,class Compare = std::less<Key>
146 ,class Allocator = new_allocator<std::pair<const Key, T> >
147 ,class Options = void >
151 ,class Compare = std::less<Key>
152 ,class Allocator = new_allocator<Key> >
156 ,class Compare = std::less<Key>
157 ,class Allocator = new_allocator<Key> >
162 ,class Compare = std::less<Key>
163 ,class Allocator = new_allocator<std::pair<Key, T> > >
168 ,class Compare = std::less<Key>
169 ,class Allocator = new_allocator<std::pair<Key, T> > >
172 template <class CharT
173 ,class Traits = std::char_traits<CharT>
174 ,class Allocator = new_allocator<CharT> >
179 ,std::char_traits<char>
180 ,new_allocator<char> >
185 ,std::char_traits<wchar_t>
186 ,new_allocator<wchar_t> >
189 static const std::size_t ADP_nodes_per_block = 256u;
190 static const std::size_t ADP_max_free_blocks = 2u;
191 static const std::size_t ADP_overhead_percent = 1u;
192 static const std::size_t ADP_only_alignment = 0u;
195 , std::size_t NodesPerBlock = ADP_nodes_per_block
196 , std::size_t MaxFreeBlocks = ADP_max_free_blocks
197 , std::size_t OverheadPercent = ADP_overhead_percent
198 , unsigned Version = 2
203 , unsigned Version = 2
204 , unsigned int AllocationDisableMask = 0>
207 static const std::size_t NodeAlloc_nodes_per_block = 256u;
211 , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
212 , std::size_t Version = 2>
213 class node_allocator;
217 class memory_resource;
220 class polymorphic_allocator;
222 class monotonic_buffer_resource;
226 template <class Allocator>
227 class resource_adaptor_imp;
229 class unsynchronized_pool_resource;
231 class synchronized_pool_resource;
235 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
237 //! Type used to tag that the input range is
238 //! guaranteed to be ordered
239 struct ordered_range_t
242 //! Value used to tag that the input range is
243 //! guaranteed to be ordered
244 static const ordered_range_t ordered_range = ordered_range_t();
246 //! Type used to tag that the input range is
247 //! guaranteed to be ordered and unique
248 struct ordered_unique_range_t
249 : public ordered_range_t
252 //! Value used to tag that the input range is
253 //! guaranteed to be ordered and unique
254 static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
256 //! Type used to tag that the inserted values
257 //! should be default initialized
258 struct default_init_t
261 //! Value used to tag that the inserted values
262 //! should be default initialized
263 static const default_init_t default_init = default_init_t();
264 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
266 //! Type used to tag that the inserted values
267 //! should be value initialized
271 //! Value used to tag that the inserted values
272 //! should be value initialized
273 static const value_init_t value_init = value_init_t();
275 namespace container_detail_really_deep_namespace {
277 //Otherwise, gcc issues a warning of previously defined
278 //anonymous_instance and unique_instance
284 (void)ordered_unique_range;
289 } //detail_really_deep_namespace {
292 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
294 }} //namespace boost { namespace container {
296 #endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP