pool_common.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2005-2012. 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_DETAIL_NODE_POOL_COMMON_HPP
  11. #define BOOST_CONTAINER_DETAIL_NODE_POOL_COMMON_HPP
  12. #if defined(_MSC_VER)
  13. # pragma once
  14. #endif
  15. #include "config_begin.hpp"
  16. #include <boost/intrusive/slist.hpp>
  17. #include <new>
  18. namespace boost {
  19. namespace container {
  20. namespace container_detail {
  21. template<class VoidPointer>
  22. struct node_slist
  23. {
  24. //This hook will be used to chain the individual nodes
  25. typedef typename bi::make_slist_base_hook
  26. <bi::void_pointer<VoidPointer>, bi::link_mode<bi::normal_link> >::type slist_hook_t;
  27. //A node object will hold node_t when it's not allocated
  28. typedef slist_hook_t node_t;
  29. typedef typename bi::make_slist
  30. <node_t, bi::linear<true>, bi::cache_last<true>, bi::base_hook<slist_hook_t> >::type node_slist_t;
  31. };
  32. template<class T>
  33. struct is_stateless_segment_manager
  34. {
  35. static const bool value = false;
  36. };
  37. } //namespace container_detail {
  38. } //namespace container {
  39. } //namespace boost {
  40. #include <boost/container/detail/config_end.hpp>
  41. #endif //#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP