container_fwd.hpp 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. #ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
  11. #define BOOST_CONTAINER_CONTAINER_FWD_HPP
  12. #ifndef BOOST_CONFIG_HPP
  13. # include <boost/config.hpp>
  14. #endif
  15. #if defined(BOOST_HAS_PRAGMA_ONCE)
  16. # pragma once
  17. #endif
  18. //! \file
  19. //! This header file forward declares the following containers:
  20. //! - boost::container::vector
  21. //! - boost::container::stable_vector
  22. //! - boost::container::static_vector
  23. //! - boost::container::small_vector
  24. //! - boost::container::slist
  25. //! - boost::container::list
  26. //! - boost::container::set
  27. //! - boost::container::multiset
  28. //! - boost::container::map
  29. //! - boost::container::multimap
  30. //! - boost::container::flat_set
  31. //! - boost::container::flat_multiset
  32. //! - boost::container::flat_map
  33. //! - boost::container::flat_multimap
  34. //! - boost::container::basic_string
  35. //! - boost::container::string
  36. //! - boost::container::wstring
  37. //!
  38. //! Forward declares the following allocators:
  39. //! - boost::container::allocator
  40. //! - boost::container::node_allocator
  41. //! - boost::container::adaptive_pool
  42. //!
  43. //! Forward declares the following polymorphic resource classes:
  44. //! - boost::container::pmr::memory_resource
  45. //! - boost::container::pmr::polymorphic_allocator
  46. //! - boost::container::pmr::monotonic_buffer_resource
  47. //! - boost::container::pmr::pool_options
  48. //! - boost::container::pmr::unsynchronized_pool_resource
  49. //! - boost::container::pmr::synchronized_pool_resource
  50. //!
  51. //! And finally it defines the following types
  52. #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  53. //Std forward declarations
  54. #ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
  55. #include <boost/container/detail/std_fwd.hpp>
  56. #endif
  57. namespace boost{
  58. namespace intrusive{
  59. namespace detail{
  60. //Create namespace to avoid compilation errors
  61. }}}
  62. namespace boost{ namespace container{ namespace dtl{
  63. namespace bi = boost::intrusive;
  64. namespace bid = boost::intrusive::detail;
  65. }}}
  66. namespace boost{ namespace container{ namespace pmr{
  67. namespace bi = boost::intrusive;
  68. namespace bid = boost::intrusive::detail;
  69. }}}
  70. #include <cstddef>
  71. #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  72. //////////////////////////////////////////////////////////////////////////////
  73. // Containers
  74. //////////////////////////////////////////////////////////////////////////////
  75. namespace boost {
  76. namespace container {
  77. #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  78. template<class T>
  79. class new_allocator;
  80. template <class T
  81. ,class Allocator = new_allocator<T>
  82. ,class Options = void>
  83. class vector;
  84. template <class T
  85. ,class Allocator = new_allocator<T> >
  86. class stable_vector;
  87. template <class T, std::size_t Capacity>
  88. class static_vector;
  89. template < class T, std::size_t N
  90. , class Allocator= new_allocator<T> >
  91. class small_vector;
  92. template <class T
  93. ,class Allocator = new_allocator<T> >
  94. class deque;
  95. template <class T
  96. ,class Allocator = new_allocator<T> >
  97. class list;
  98. template <class T
  99. ,class Allocator = new_allocator<T> >
  100. class slist;
  101. template <class Key
  102. ,class Compare = std::less<Key>
  103. ,class Allocator = new_allocator<Key>
  104. ,class Options = void>
  105. class set;
  106. template <class Key
  107. ,class Compare = std::less<Key>
  108. ,class Allocator = new_allocator<Key>
  109. ,class Options = void >
  110. class multiset;
  111. template <class Key
  112. ,class T
  113. ,class Compare = std::less<Key>
  114. ,class Allocator = new_allocator<std::pair<const Key, T> >
  115. ,class Options = void >
  116. class map;
  117. template <class Key
  118. ,class T
  119. ,class Compare = std::less<Key>
  120. ,class Allocator = new_allocator<std::pair<const Key, T> >
  121. ,class Options = void >
  122. class multimap;
  123. template <class Key
  124. ,class Compare = std::less<Key>
  125. ,class Allocator = new_allocator<Key> >
  126. class flat_set;
  127. template <class Key
  128. ,class Compare = std::less<Key>
  129. ,class Allocator = new_allocator<Key> >
  130. class flat_multiset;
  131. template <class Key
  132. ,class T
  133. ,class Compare = std::less<Key>
  134. ,class Allocator = new_allocator<std::pair<Key, T> > >
  135. class flat_map;
  136. template <class Key
  137. ,class T
  138. ,class Compare = std::less<Key>
  139. ,class Allocator = new_allocator<std::pair<Key, T> > >
  140. class flat_multimap;
  141. template <class CharT
  142. ,class Traits = std::char_traits<CharT>
  143. ,class Allocator = new_allocator<CharT> >
  144. class basic_string;
  145. typedef basic_string
  146. <char
  147. ,std::char_traits<char>
  148. ,new_allocator<char> >
  149. string;
  150. typedef basic_string
  151. <wchar_t
  152. ,std::char_traits<wchar_t>
  153. ,new_allocator<wchar_t> >
  154. wstring;
  155. static const std::size_t ADP_nodes_per_block = 256u;
  156. static const std::size_t ADP_max_free_blocks = 2u;
  157. static const std::size_t ADP_overhead_percent = 1u;
  158. static const std::size_t ADP_only_alignment = 0u;
  159. template < class T
  160. , std::size_t NodesPerBlock = ADP_nodes_per_block
  161. , std::size_t MaxFreeBlocks = ADP_max_free_blocks
  162. , std::size_t OverheadPercent = ADP_overhead_percent
  163. , unsigned Version = 2
  164. >
  165. class adaptive_pool;
  166. template < class T
  167. , unsigned Version = 2
  168. , unsigned int AllocationDisableMask = 0>
  169. class allocator;
  170. static const std::size_t NodeAlloc_nodes_per_block = 256u;
  171. template
  172. < class T
  173. , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
  174. , std::size_t Version = 2>
  175. class node_allocator;
  176. namespace pmr {
  177. class memory_resource;
  178. template<class T>
  179. class polymorphic_allocator;
  180. class monotonic_buffer_resource;
  181. struct pool_options;
  182. template <class Allocator>
  183. class resource_adaptor_imp;
  184. class unsynchronized_pool_resource;
  185. class synchronized_pool_resource;
  186. } //namespace pmr {
  187. #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  188. //! Type used to tag that the input range is
  189. //! guaranteed to be ordered
  190. struct ordered_range_t
  191. {};
  192. //! Value used to tag that the input range is
  193. //! guaranteed to be ordered
  194. static const ordered_range_t ordered_range = ordered_range_t();
  195. //! Type used to tag that the input range is
  196. //! guaranteed to be ordered and unique
  197. struct ordered_unique_range_t
  198. : public ordered_range_t
  199. {};
  200. //! Value used to tag that the input range is
  201. //! guaranteed to be ordered and unique
  202. static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
  203. //! Type used to tag that the inserted values
  204. //! should be default initialized
  205. struct default_init_t
  206. {};
  207. //! Value used to tag that the inserted values
  208. //! should be default initialized
  209. static const default_init_t default_init = default_init_t();
  210. #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  211. //! Type used to tag that the inserted values
  212. //! should be value initialized
  213. struct value_init_t
  214. {};
  215. //! Value used to tag that the inserted values
  216. //! should be value initialized
  217. static const value_init_t value_init = value_init_t();
  218. namespace container_detail_really_deep_namespace {
  219. //Otherwise, gcc issues a warning of previously defined
  220. //anonymous_instance and unique_instance
  221. struct dummy
  222. {
  223. dummy()
  224. {
  225. (void)ordered_range;
  226. (void)ordered_unique_range;
  227. (void)default_init;
  228. }
  229. };
  230. } //detail_really_deep_namespace {
  231. #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  232. }} //namespace boost { namespace container {
  233. #endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP