Chris@16
|
1 //////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
2 //
|
Chris@16
|
3 // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
|
Chris@16
|
4 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 //
|
Chris@16
|
7 // See http://www.boost.org/libs/container for documentation.
|
Chris@16
|
8 //
|
Chris@16
|
9 //////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
10
|
Chris@16
|
11 #ifndef BOOST_CONTAINER_DETAIL_NODE_POOL_COMMON_HPP
|
Chris@16
|
12 #define BOOST_CONTAINER_DETAIL_NODE_POOL_COMMON_HPP
|
Chris@16
|
13
|
Chris@16
|
14 #if defined(_MSC_VER)
|
Chris@16
|
15 # pragma once
|
Chris@16
|
16 #endif
|
Chris@16
|
17
|
Chris@16
|
18 #include "config_begin.hpp"
|
Chris@16
|
19 #include <boost/intrusive/slist.hpp>
|
Chris@16
|
20 #include <new>
|
Chris@16
|
21
|
Chris@16
|
22 namespace boost {
|
Chris@16
|
23 namespace container {
|
Chris@16
|
24 namespace container_detail {
|
Chris@16
|
25
|
Chris@16
|
26 template<class VoidPointer>
|
Chris@16
|
27 struct node_slist
|
Chris@16
|
28 {
|
Chris@16
|
29 //This hook will be used to chain the individual nodes
|
Chris@16
|
30 typedef typename bi::make_slist_base_hook
|
Chris@16
|
31 <bi::void_pointer<VoidPointer>, bi::link_mode<bi::normal_link> >::type slist_hook_t;
|
Chris@16
|
32
|
Chris@16
|
33 //A node object will hold node_t when it's not allocated
|
Chris@16
|
34 typedef slist_hook_t node_t;
|
Chris@16
|
35
|
Chris@16
|
36 typedef typename bi::make_slist
|
Chris@16
|
37 <node_t, bi::linear<true>, bi::cache_last<true>, bi::base_hook<slist_hook_t> >::type node_slist_t;
|
Chris@16
|
38 };
|
Chris@16
|
39
|
Chris@16
|
40 template<class T>
|
Chris@16
|
41 struct is_stateless_segment_manager
|
Chris@16
|
42 {
|
Chris@16
|
43 static const bool value = false;
|
Chris@16
|
44 };
|
Chris@16
|
45
|
Chris@16
|
46 } //namespace container_detail {
|
Chris@16
|
47 } //namespace container {
|
Chris@16
|
48 } //namespace boost {
|
Chris@16
|
49
|
Chris@16
|
50 #include <boost/container/detail/config_end.hpp>
|
Chris@16
|
51
|
Chris@16
|
52 #endif //#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP
|