1 /////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Olaf Krzikalla 2004-2006.
4 // (C) Copyright Ion Gaztanaga 2006-2013
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 // See http://www.boost.org/libs/intrusive for documentation.
12 /////////////////////////////////////////////////////////////////////////////
14 #ifndef BOOST_INTRUSIVE_SLIST_NODE_HPP
15 #define BOOST_INTRUSIVE_SLIST_NODE_HPP
17 #ifndef BOOST_CONFIG_HPP
18 # include <boost/config.hpp>
21 #if defined(BOOST_HAS_PRAGMA_ONCE)
25 #include <boost/intrusive/detail/config_begin.hpp>
26 #include <boost/intrusive/detail/workaround.hpp>
27 #include <boost/intrusive/pointer_rebind.hpp>
32 template<class VoidPointer>
35 typedef typename pointer_rebind<VoidPointer, slist_node>::type node_ptr;
39 // slist_node_traits can be used with circular_slist_algorithms and supplies
40 // a slist_node holding the pointers needed for a singly-linked list
41 // it is used by slist_base_hook and slist_member_hook
42 template<class VoidPointer>
43 struct slist_node_traits
45 typedef slist_node<VoidPointer> node;
46 typedef typename node::node_ptr node_ptr;
47 typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
49 BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
52 BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
55 BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
59 } //namespace intrusive
62 #include <boost/intrusive/detail/config_end.hpp>
64 #endif //BOOST_INTRUSIVE_SLIST_NODE_HPP