diff options
Diffstat (limited to 'boost/intrusive/detail/any_node_and_algorithms.hpp')
-rw-r--r-- | boost/intrusive/detail/any_node_and_algorithms.hpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/boost/intrusive/detail/any_node_and_algorithms.hpp b/boost/intrusive/detail/any_node_and_algorithms.hpp index 5a0e8c27fe..3c76e58528 100644 --- a/boost/intrusive/detail/any_node_and_algorithms.hpp +++ b/boost/intrusive/detail/any_node_and_algorithms.hpp @@ -13,7 +13,11 @@ #ifndef BOOST_INTRUSIVE_ANY_NODE_HPP #define BOOST_INTRUSIVE_ANY_NODE_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif + +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif @@ -43,13 +47,13 @@ struct any_list_node_traits typedef typename node::node_ptr node_ptr; typedef typename node::const_node_ptr const_node_ptr; - static const node_ptr &get_next(const const_node_ptr & n) + static node_ptr get_next(const const_node_ptr & n) { return n->node_ptr_1; } static void set_next(const node_ptr & n, const node_ptr & next) { n->node_ptr_1 = next; } - static const node_ptr &get_previous(const const_node_ptr & n) + static node_ptr get_previous(const const_node_ptr & n) { return n->node_ptr_2; } static void set_previous(const node_ptr & n, const node_ptr & prev) @@ -64,7 +68,7 @@ struct any_slist_node_traits typedef typename node::node_ptr node_ptr; typedef typename node::const_node_ptr const_node_ptr; - static const node_ptr &get_next(const const_node_ptr & n) + static node_ptr get_next(const const_node_ptr & n) { return n->node_ptr_1; } static void set_next(const node_ptr & n, const node_ptr & next) @@ -84,7 +88,7 @@ struct any_unordered_node_traits static const bool store_hash = true; static const bool optimize_multikey = true; - static const node_ptr &get_next(const const_node_ptr & n) + static node_ptr get_next(const const_node_ptr & n) { return n->node_ptr_1; } static void set_next(const node_ptr & n, const node_ptr & next) @@ -113,19 +117,19 @@ struct any_rbtree_node_traits typedef std::size_t color; - static const node_ptr &get_parent(const const_node_ptr & n) + static node_ptr get_parent(const const_node_ptr & n) { return n->node_ptr_1; } static void set_parent(const node_ptr & n, const node_ptr & p) { n->node_ptr_1 = p; } - static const node_ptr &get_left(const const_node_ptr & n) + static node_ptr get_left(const const_node_ptr & n) { return n->node_ptr_2; } static void set_left(const node_ptr & n, const node_ptr & l) { n->node_ptr_2 = l; } - static const node_ptr &get_right(const const_node_ptr & n) + static node_ptr get_right(const const_node_ptr & n) { return n->node_ptr_3; } static void set_right(const node_ptr & n, const node_ptr & r) @@ -154,19 +158,19 @@ struct any_avltree_node_traits typedef std::size_t balance; - static const node_ptr &get_parent(const const_node_ptr & n) + static node_ptr get_parent(const const_node_ptr & n) { return n->node_ptr_1; } static void set_parent(const node_ptr & n, const node_ptr & p) { n->node_ptr_1 = p; } - static const node_ptr &get_left(const const_node_ptr & n) + static node_ptr get_left(const const_node_ptr & n) { return n->node_ptr_2; } static void set_left(const node_ptr & n, const node_ptr & l) { n->node_ptr_2 = l; } - static const node_ptr &get_right(const const_node_ptr & n) + static node_ptr get_right(const const_node_ptr & n) { return n->node_ptr_3; } static void set_right(const node_ptr & n, const node_ptr & r) @@ -196,19 +200,19 @@ struct any_tree_node_traits typedef typename node::node_ptr node_ptr; typedef typename node::const_node_ptr const_node_ptr; - static const node_ptr &get_parent(const const_node_ptr & n) + static node_ptr get_parent(const const_node_ptr & n) { return n->node_ptr_1; } static void set_parent(const node_ptr & n, const node_ptr & p) { n->node_ptr_1 = p; } - static const node_ptr &get_left(const const_node_ptr & n) + static node_ptr get_left(const const_node_ptr & n) { return n->node_ptr_2; } static void set_left(const node_ptr & n, const node_ptr & l) { n->node_ptr_2 = l; } - static const node_ptr &get_right(const const_node_ptr & n) + static node_ptr get_right(const const_node_ptr & n) { return n->node_ptr_3; } static void set_right(const node_ptr & n, const node_ptr & r) |