annotate DEPENDENCIES/generic/include/boost/intrusive/detail/slist_node.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 /////////////////////////////////////////////////////////////////////////////
Chris@16 2 //
Chris@16 3 // (C) Copyright Olaf Krzikalla 2004-2006.
Chris@16 4 // (C) Copyright Ion Gaztanaga 2006-2013
Chris@16 5 //
Chris@16 6 // Distributed under the Boost Software License, Version 1.0.
Chris@16 7 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 8 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 9 //
Chris@16 10 // See http://www.boost.org/libs/intrusive for documentation.
Chris@16 11 //
Chris@16 12 /////////////////////////////////////////////////////////////////////////////
Chris@16 13
Chris@16 14 #ifndef BOOST_INTRUSIVE_SLIST_NODE_HPP
Chris@16 15 #define BOOST_INTRUSIVE_SLIST_NODE_HPP
Chris@16 16
Chris@101 17 #ifndef BOOST_CONFIG_HPP
Chris@101 18 # include <boost/config.hpp>
Chris@101 19 #endif
Chris@101 20
Chris@101 21 #if defined(BOOST_HAS_PRAGMA_ONCE)
Chris@101 22 # pragma once
Chris@101 23 #endif
Chris@101 24
Chris@16 25 #include <boost/intrusive/detail/config_begin.hpp>
Chris@101 26 #include <boost/intrusive/pointer_rebind.hpp>
Chris@16 27
Chris@16 28 namespace boost {
Chris@16 29 namespace intrusive {
Chris@16 30
Chris@16 31 template<class VoidPointer>
Chris@16 32 struct slist_node
Chris@16 33 {
Chris@101 34 typedef typename pointer_rebind<VoidPointer, slist_node>::type node_ptr;
Chris@16 35 node_ptr next_;
Chris@16 36 };
Chris@16 37
Chris@16 38 // slist_node_traits can be used with circular_slist_algorithms and supplies
Chris@16 39 // a slist_node holding the pointers needed for a singly-linked list
Chris@16 40 // it is used by slist_base_hook and slist_member_hook
Chris@16 41 template<class VoidPointer>
Chris@16 42 struct slist_node_traits
Chris@16 43 {
Chris@101 44 typedef slist_node<VoidPointer> node;
Chris@101 45 typedef typename node::node_ptr node_ptr;
Chris@101 46 typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
Chris@16 47
Chris@16 48 static node_ptr get_next(const const_node_ptr & n)
Chris@16 49 { return n->next_; }
Chris@16 50
Chris@16 51 static node_ptr get_next(const node_ptr & n)
Chris@16 52 { return n->next_; }
Chris@16 53
Chris@16 54 static void set_next(const node_ptr & n, const node_ptr & next)
Chris@16 55 { n->next_ = next; }
Chris@16 56 };
Chris@16 57
Chris@16 58 } //namespace intrusive
Chris@16 59 } //namespace boost
Chris@16 60
Chris@16 61 #include <boost/intrusive/detail/config_end.hpp>
Chris@16 62
Chris@16 63 #endif //BOOST_INTRUSIVE_SLIST_NODE_HPP