pool_common.hpp 1.6 KB

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