Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:37

0001 /////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Olaf Krzikalla 2004-2006.
0004 // (C) Copyright Ion Gaztanaga  2006-2013
0005 //
0006 // Distributed under the Boost Software License, Version 1.0.
0007 //    (See accompanying file LICENSE_1_0.txt or copy at
0008 //          http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 // See http://www.boost.org/libs/intrusive for documentation.
0011 //
0012 /////////////////////////////////////////////////////////////////////////////
0013 
0014 #ifndef BOOST_INTRUSIVE_SLIST_NODE_HPP
0015 #define BOOST_INTRUSIVE_SLIST_NODE_HPP
0016 
0017 #ifndef BOOST_CONFIG_HPP
0018 #  include <boost/config.hpp>
0019 #endif
0020 
0021 #if defined(BOOST_HAS_PRAGMA_ONCE)
0022 #  pragma once
0023 #endif
0024 
0025 #include <boost/intrusive/detail/config_begin.hpp>
0026 #include <boost/intrusive/detail/workaround.hpp>
0027 #include <boost/intrusive/pointer_rebind.hpp>
0028 
0029 namespace boost {
0030 namespace intrusive {
0031 
0032 template<class VoidPointer>
0033 struct slist_node
0034 {
0035    typedef typename pointer_rebind<VoidPointer, slist_node>::type   node_ptr;
0036    node_ptr next_;
0037 };
0038 
0039 // slist_node_traits can be used with circular_slist_algorithms and supplies
0040 // a slist_node holding the pointers needed for a singly-linked list
0041 // it is used by slist_base_hook and slist_member_hook
0042 template<class VoidPointer>
0043 struct slist_node_traits
0044 {
0045    typedef slist_node<VoidPointer>  node;
0046    typedef typename node::node_ptr  node_ptr;
0047    typedef typename pointer_rebind<VoidPointer, const node>::type    const_node_ptr;
0048 
0049    BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
0050    {  return n->next_;  }
0051 
0052    BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(node_ptr n)
0053    {  return n->next_;  }
0054 
0055    BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
0056    {  n->next_ = next;  }
0057 };
0058 
0059 } //namespace intrusive
0060 } //namespace boost
0061 
0062 #include <boost/intrusive/detail/config_end.hpp>
0063 
0064 #endif //BOOST_INTRUSIVE_SLIST_NODE_HPP