container_fwd.hpp 7.6 KB

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