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 container_detail{
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 //! Enumeration used to configure ordered associative containers
92 //! with a concrete tree implementation.
101 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
107 ,class Allocator = new_allocator<T> >
111 ,class Allocator = new_allocator<T> >
114 template <class T, std::size_t Capacity>
117 template < class T, std::size_t N
118 , class Allocator= new_allocator<T> >
122 ,class Allocator = new_allocator<T> >
126 ,class Allocator = new_allocator<T> >
130 ,class Allocator = new_allocator<T> >
133 template<tree_type_enum TreeType, bool OptimizeSize>
136 typedef tree_opt<red_black_tree, true> tree_assoc_defaults;
139 ,class Compare = std::less<Key>
140 ,class Allocator = new_allocator<Key>
141 ,class Options = tree_assoc_defaults >
145 ,class Compare = std::less<Key>
146 ,class Allocator = new_allocator<Key>
147 ,class Options = tree_assoc_defaults >
152 ,class Compare = std::less<Key>
153 ,class Allocator = new_allocator<std::pair<const Key, T> >
154 ,class Options = tree_assoc_defaults >
159 ,class Compare = std::less<Key>
160 ,class Allocator = new_allocator<std::pair<const Key, T> >
161 ,class Options = tree_assoc_defaults >
165 ,class Compare = std::less<Key>
166 ,class Allocator = new_allocator<Key> >
170 ,class Compare = std::less<Key>
171 ,class Allocator = new_allocator<Key> >
176 ,class Compare = std::less<Key>
177 ,class Allocator = new_allocator<std::pair<Key, T> > >
182 ,class Compare = std::less<Key>
183 ,class Allocator = new_allocator<std::pair<Key, T> > >
186 template <class CharT
187 ,class Traits = std::char_traits<CharT>
188 ,class Allocator = new_allocator<CharT> >
193 ,std::char_traits<char>
194 ,new_allocator<char> >
199 ,std::char_traits<wchar_t>
200 ,new_allocator<wchar_t> >
203 static const std::size_t ADP_nodes_per_block = 256u;
204 static const std::size_t ADP_max_free_blocks = 2u;
205 static const std::size_t ADP_overhead_percent = 1u;
206 static const std::size_t ADP_only_alignment = 0u;
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
217 , unsigned Version = 2
218 , unsigned int AllocationDisableMask = 0>
221 static const std::size_t NodeAlloc_nodes_per_block = 256u;
225 , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
226 , std::size_t Version = 2>
227 class node_allocator;
231 class memory_resource;
234 class polymorphic_allocator;
236 class monotonic_buffer_resource;
240 template <class Allocator>
241 class resource_adaptor_imp;
243 class unsynchronized_pool_resource;
245 class synchronized_pool_resource;
251 //! Default options for tree-based associative containers
252 //! - tree_type<red_black_tree>
253 //! - optimize_size<true>
254 typedef implementation_defined tree_assoc_defaults;
256 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
258 //! Type used to tag that the input range is
259 //! guaranteed to be ordered
260 struct ordered_range_t
263 //! Value used to tag that the input range is
264 //! guaranteed to be ordered
265 static const ordered_range_t ordered_range = ordered_range_t();
267 //! Type used to tag that the input range is
268 //! guaranteed to be ordered and unique
269 struct ordered_unique_range_t
270 : public ordered_range_t
273 //! Value used to tag that the input range is
274 //! guaranteed to be ordered and unique
275 static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
277 //! Type used to tag that the inserted values
278 //! should be default initialized
279 struct default_init_t
282 //! Value used to tag that the inserted values
283 //! should be default initialized
284 static const default_init_t default_init = default_init_t();
285 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
287 //! Type used to tag that the inserted values
288 //! should be value initialized
292 //! Value used to tag that the inserted values
293 //! should be value initialized
294 static const value_init_t value_init = value_init_t();
296 namespace container_detail_really_deep_namespace {
298 //Otherwise, gcc issues a warning of previously defined
299 //anonymous_instance and unique_instance
305 (void)ordered_unique_range;
310 } //detail_really_deep_namespace {
313 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
315 }} //namespace boost { namespace container {
317 #endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP