container_fwd.hpp 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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 T1, class T2>
  79. struct pair;
  80. template<class T>
  81. class new_allocator;
  82. template <class T
  83. ,class Allocator = void
  84. ,class Options = void>
  85. class vector;
  86. template <class T
  87. ,class Allocator = void >
  88. class stable_vector;
  89. template <class T, std::size_t Capacity>
  90. class static_vector;
  91. template < class T, std::size_t N
  92. , class Allocator = void >
  93. class small_vector;
  94. template <class T
  95. ,class Allocator = void >
  96. class deque;
  97. template <class T
  98. ,class Allocator = void >
  99. class list;
  100. template <class T
  101. ,class Allocator = void >
  102. class slist;
  103. template <class Key
  104. ,class Compare = std::less<Key>
  105. ,class Allocator = void
  106. ,class Options = void>
  107. class set;
  108. template <class Key
  109. ,class Compare = std::less<Key>
  110. ,class Allocator = void
  111. ,class Options = void >
  112. class multiset;
  113. template <class Key
  114. ,class T
  115. ,class Compare = std::less<Key>
  116. ,class Allocator = void
  117. ,class Options = void >
  118. class map;
  119. template <class Key
  120. ,class T
  121. ,class Compare = std::less<Key>
  122. ,class Allocator = void
  123. ,class Options = void >
  124. class multimap;
  125. template <class Key
  126. ,class Compare = std::less<Key>
  127. ,class Allocator = void >
  128. class flat_set;
  129. template <class Key
  130. ,class Compare = std::less<Key>
  131. ,class Allocator = void >
  132. class flat_multiset;
  133. template <class Key
  134. ,class T
  135. ,class Compare = std::less<Key>
  136. ,class Allocator = void >
  137. class flat_map;
  138. template <class Key
  139. ,class T
  140. ,class Compare = std::less<Key>
  141. ,class Allocator = void >
  142. class flat_multimap;
  143. template <class CharT
  144. ,class Traits = std::char_traits<CharT>
  145. ,class Allocator = void >
  146. class basic_string;
  147. typedef basic_string <char> string;
  148. typedef basic_string<wchar_t> wstring;
  149. static const std::size_t ADP_nodes_per_block = 256u;
  150. static const std::size_t ADP_max_free_blocks = 2u;
  151. static const std::size_t ADP_overhead_percent = 1u;
  152. static const std::size_t ADP_only_alignment = 0u;
  153. template < class T
  154. , std::size_t NodesPerBlock = ADP_nodes_per_block
  155. , std::size_t MaxFreeBlocks = ADP_max_free_blocks
  156. , std::size_t OverheadPercent = ADP_overhead_percent
  157. , unsigned Version = 2
  158. >
  159. class adaptive_pool;
  160. template < class T
  161. , unsigned Version = 2
  162. , unsigned int AllocationDisableMask = 0>
  163. class allocator;
  164. static const std::size_t NodeAlloc_nodes_per_block = 256u;
  165. template
  166. < class T
  167. , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
  168. , std::size_t Version = 2>
  169. class node_allocator;
  170. namespace pmr {
  171. class memory_resource;
  172. template<class T>
  173. class polymorphic_allocator;
  174. class monotonic_buffer_resource;
  175. struct pool_options;
  176. template <class Allocator>
  177. class resource_adaptor_imp;
  178. class unsynchronized_pool_resource;
  179. class synchronized_pool_resource;
  180. } //namespace pmr {
  181. #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  182. //! Type used to tag that the input range is
  183. //! guaranteed to be ordered
  184. struct ordered_range_t
  185. {};
  186. //! Value used to tag that the input range is
  187. //! guaranteed to be ordered
  188. static const ordered_range_t ordered_range = ordered_range_t();
  189. //! Type used to tag that the input range is
  190. //! guaranteed to be ordered and unique
  191. struct ordered_unique_range_t
  192. : public ordered_range_t
  193. {};
  194. //! Value used to tag that the input range is
  195. //! guaranteed to be ordered and unique
  196. static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
  197. //! Type used to tag that the inserted values
  198. //! should be default initialized
  199. struct default_init_t
  200. {};
  201. //! Value used to tag that the inserted values
  202. //! should be default initialized
  203. static const default_init_t default_init = default_init_t();
  204. #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  205. //! Type used to tag that the inserted values
  206. //! should be value initialized
  207. struct value_init_t
  208. {};
  209. //! Value used to tag that the inserted values
  210. //! should be value initialized
  211. static const value_init_t value_init = value_init_t();
  212. namespace container_detail_really_deep_namespace {
  213. //Otherwise, gcc issues a warning of previously defined
  214. //anonymous_instance and unique_instance
  215. struct dummy
  216. {
  217. dummy()
  218. {
  219. (void)ordered_range;
  220. (void)ordered_unique_range;
  221. (void)default_init;
  222. }
  223. };
  224. } //detail_really_deep_namespace {
  225. #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  226. }} //namespace boost { namespace container {
  227. #endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP