update boost on linux
This commit is contained in:
@@ -52,13 +52,13 @@ struct any_list_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
{ n->node_ptr_1 = next; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const const_node_ptr & n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_previous(const node_ptr & n, const node_ptr & prev)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_previous(node_ptr n, node_ptr prev)
|
||||
{ n->node_ptr_2 = prev; }
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ struct any_slist_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
{ n->node_ptr_1 = next; }
|
||||
};
|
||||
|
||||
@@ -93,13 +93,13 @@ struct any_unordered_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
{ n->node_ptr_1 = next; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const const_node_ptr & n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(const node_ptr & n, const node_ptr & prev)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(node_ptr n, node_ptr prev)
|
||||
{ n->node_ptr_2 = prev; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const const_node_ptr & n)
|
||||
@@ -122,19 +122,19 @@ struct any_rbtree_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->node_ptr_1 = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->node_ptr_2 = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
{ return n->node_ptr_3; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->node_ptr_3 = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
|
||||
@@ -163,19 +163,19 @@ struct any_avltree_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->node_ptr_1 = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->node_ptr_2 = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
{ return n->node_ptr_3; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->node_ptr_3 = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
|
||||
@@ -205,19 +205,19 @@ struct any_tree_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->node_ptr_1 = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->node_ptr_2 = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
{ return n->node_ptr_3; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->node_ptr_3 = r; }
|
||||
};
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ struct avltree_node
|
||||
template<class VoidPointer>
|
||||
struct default_avltree_node_traits_impl
|
||||
{
|
||||
typedef avltree_node<VoidPointer> node;
|
||||
typedef avltree_node<VoidPointer> node;
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename node::const_node_ptr const_node_ptr;
|
||||
|
||||
@@ -75,7 +75,7 @@ struct default_avltree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->parent_ = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
@@ -84,7 +84,7 @@ struct default_avltree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
@@ -93,7 +93,7 @@ struct default_avltree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
|
||||
@@ -121,8 +121,8 @@ template<class VoidPointer>
|
||||
struct compact_avltree_node_traits_impl
|
||||
{
|
||||
typedef compact_avltree_node<VoidPointer> node;
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename node::const_node_ptr const_node_ptr;
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename node::const_node_ptr const_node_ptr;
|
||||
typedef typename node::balance balance;
|
||||
|
||||
typedef pointer_plus_bits<node_ptr, 2> ptr_bit;
|
||||
@@ -130,19 +130,19 @@ struct compact_avltree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
{ return ptr_bit::get_pointer(n->parent_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ ptr_bit::set_pointer(n->parent_, p); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
|
||||
|
||||
@@ -52,7 +52,7 @@ class common_slist_algorithms
|
||||
return p;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr this_node)
|
||||
{ NodeTraits::set_next(this_node, node_ptr()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & this_node)
|
||||
@@ -64,29 +64,29 @@ class common_slist_algorithms
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & this_node)
|
||||
{ return !NodeTraits::get_next(this_node); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(const node_ptr & prev_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node)
|
||||
{
|
||||
const_node_ptr this_node(NodeTraits::get_next(prev_node));
|
||||
NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node, node_ptr last_node)
|
||||
{ NodeTraits::set_next(prev_node, last_node); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void link_after(const node_ptr & prev_node, const node_ptr & this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void link_after(node_ptr prev_node, node_ptr this_node)
|
||||
{
|
||||
NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
|
||||
NodeTraits::set_next(prev_node, this_node);
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void incorporate_after(const node_ptr & bp, const node_ptr & b, const node_ptr & be)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void incorporate_after(node_ptr bp, node_ptr b, node_ptr be)
|
||||
{
|
||||
node_ptr p(NodeTraits::get_next(bp));
|
||||
NodeTraits::set_next(bp, b);
|
||||
NodeTraits::set_next(be, p);
|
||||
}
|
||||
|
||||
static void transfer_after(const node_ptr & bp, const node_ptr & bb, const node_ptr & be)
|
||||
static void transfer_after(node_ptr bp, node_ptr bb, node_ptr be)
|
||||
{
|
||||
if (bp != bb && bp != be && bb != be) {
|
||||
node_ptr next_b = NodeTraits::get_next(bb);
|
||||
@@ -107,7 +107,7 @@ class common_slist_algorithms
|
||||
};
|
||||
|
||||
template<class Pred>
|
||||
static void stable_partition(node_ptr before_beg, const node_ptr &end, Pred pred, stable_partition_info &info)
|
||||
static void stable_partition(node_ptr before_beg, node_ptr end, Pred pred, stable_partition_info &info)
|
||||
{
|
||||
node_ptr bcur = before_beg;
|
||||
node_ptr cur = node_traits::get_next(bcur);
|
||||
|
||||
@@ -17,33 +17,20 @@
|
||||
#ifdef BOOST_MSVC
|
||||
|
||||
#pragma warning (push)
|
||||
//
|
||||
//'function' : resolved overload was found by argument-dependent lookup
|
||||
//A function found by argument-dependent lookup (Koenig lookup) was eventually
|
||||
//chosen by overload resolution.
|
||||
//
|
||||
//In Visual C++ .NET and earlier compilers, a different function would have
|
||||
//been called. To pick the original function, use an explicitly qualified name.
|
||||
//
|
||||
|
||||
//warning C4275: non dll-interface class 'x' used as base for
|
||||
//dll-interface class 'Y'
|
||||
#pragma warning (disable : 4275)
|
||||
//warning C4251: 'x' : class 'y' needs to have dll-interface to
|
||||
//be used by clients of class 'z'
|
||||
#pragma warning (disable : 4251)
|
||||
#pragma warning (disable : 4675)
|
||||
#pragma warning (disable : 4996)
|
||||
#pragma warning (disable : 4503)
|
||||
#pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier"
|
||||
#pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2"
|
||||
#pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter
|
||||
#pragma warning (disable : 4996) // "function": was declared deprecated
|
||||
#pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated
|
||||
#pragma warning (disable : 4284) // odd return type for operator->
|
||||
#pragma warning (disable : 4244) // possible loss of data
|
||||
#pragma warning (disable : 4521) ////Disable "multiple copy constructors specified"
|
||||
#pragma warning (disable : 4127) //conditional expression is constant
|
||||
#pragma warning (disable : 4146)
|
||||
#pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
|
||||
#pragma warning (disable : 4267) //conversion from 'X' to 'Y', possible loss of data
|
||||
#pragma warning (disable : 4541) //'typeid' used on polymorphic type 'boost::exception' with /GR-
|
||||
#pragma warning (disable : 4512) //'typeid' used on polymorphic type 'boost::exception' with /GR-
|
||||
#pragma warning (disable : 4522)
|
||||
#pragma warning (disable : 4522) // "class" : multiple assignment operators specified
|
||||
#pragma warning (disable : 4706) //assignment within conditional expression
|
||||
#pragma warning (disable : 4710) // function not inlined
|
||||
#pragma warning (disable : 4714) // "function": marked as __forceinline not inlined
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <boost/intrusive/detail/to_raw_pointer.hpp>
|
||||
#include <boost/move/detail/to_raw_pointer.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@@ -48,7 +48,7 @@ struct default_header_holder : public NodeTraits::node
|
||||
|
||||
// (unsafe) downcast used to implement container-from-iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE static default_header_holder* get_holder(const node_ptr &p)
|
||||
{ return static_cast< default_header_holder* >(boost::intrusive::detail::to_raw_pointer(p)); }
|
||||
{ return static_cast< default_header_holder* >(boost::movelib::to_raw_pointer(p)); }
|
||||
};
|
||||
|
||||
// type function producing the header node holder
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace detail {
|
||||
#define BOOST_INTRUSIVE_TT_DECL
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) && !defined(_M_ARM) && !defined(UNDER_CE)
|
||||
#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) && !defined(_M_ARM) && !defined(_M_ARM64) && !defined(UNDER_CE)
|
||||
#define BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||
#endif
|
||||
|
||||
@@ -158,7 +158,7 @@ template<typename T>
|
||||
struct is_unary_or_binary_function : is_unary_or_binary_function_impl<T>
|
||||
{};
|
||||
|
||||
template<typename T, bool = is_unary_or_binary_function<T>::value>
|
||||
template<typename T, typename Tag = void, bool = is_unary_or_binary_function<T>::value>
|
||||
class ebo_functor_holder
|
||||
{
|
||||
BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
|
||||
@@ -222,8 +222,8 @@ class ebo_functor_holder
|
||||
T t_;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class ebo_functor_holder<T, false>
|
||||
template<typename T, typename Tag>
|
||||
class ebo_functor_holder<T, Tag, false>
|
||||
: public T
|
||||
{
|
||||
BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
|
||||
|
||||
@@ -161,52 +161,52 @@ class generic_hook
|
||||
< NodeTraits
|
||||
, Tag, LinkMode, BaseHookType> hooktags;
|
||||
|
||||
node_ptr this_ptr()
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr this_ptr()
|
||||
{ return pointer_traits<node_ptr>::pointer_to(static_cast<node&>(*this)); }
|
||||
|
||||
const_node_ptr this_ptr() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_node_ptr this_ptr() const
|
||||
{ return pointer_traits<const_node_ptr>::pointer_to(static_cast<const node&>(*this)); }
|
||||
|
||||
public:
|
||||
/// @endcond
|
||||
|
||||
generic_hook()
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook()
|
||||
{
|
||||
if(hooktags::safemode_or_autounlink){
|
||||
node_algorithms::init(this->this_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
generic_hook(const generic_hook& )
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook(const generic_hook& )
|
||||
{
|
||||
if(hooktags::safemode_or_autounlink){
|
||||
node_algorithms::init(this->this_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
generic_hook& operator=(const generic_hook& )
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook& operator=(const generic_hook& )
|
||||
{ return *this; }
|
||||
|
||||
~generic_hook()
|
||||
BOOST_INTRUSIVE_FORCEINLINE ~generic_hook()
|
||||
{
|
||||
destructor_impl
|
||||
(*this, detail::link_dispatch<hooktags::link_mode>());
|
||||
}
|
||||
|
||||
void swap_nodes(generic_hook &other)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void swap_nodes(generic_hook &other)
|
||||
{
|
||||
node_algorithms::swap_nodes
|
||||
(this->this_ptr(), other.this_ptr());
|
||||
}
|
||||
|
||||
bool is_linked() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool is_linked() const
|
||||
{
|
||||
//is_linked() can be only used in safe-mode or auto-unlink
|
||||
BOOST_STATIC_ASSERT(( hooktags::safemode_or_autounlink ));
|
||||
return !node_algorithms::unique(this->this_ptr());
|
||||
}
|
||||
|
||||
void unlink()
|
||||
BOOST_INTRUSIVE_FORCEINLINE void unlink()
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( (int)hooktags::link_mode == (int)auto_unlink ));
|
||||
node_ptr n(this->this_ptr());
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template <class Slist>
|
||||
struct bucket_impl : public Slist
|
||||
@@ -149,8 +148,6 @@ struct get_slist_impl
|
||||
{};
|
||||
};
|
||||
|
||||
} //namespace detail {
|
||||
|
||||
template<class BucketValueTraits, bool IsConst>
|
||||
class hashtable_iterator
|
||||
{
|
||||
@@ -169,17 +166,22 @@ class hashtable_iterator
|
||||
private:
|
||||
typedef typename value_traits::node_traits node_traits;
|
||||
typedef typename node_traits::node_ptr node_ptr;
|
||||
typedef typename detail::get_slist_impl
|
||||
< typename detail::reduced_slist_node_traits
|
||||
typedef typename get_slist_impl
|
||||
< typename reduced_slist_node_traits
|
||||
<node_traits>::type >::type slist_impl;
|
||||
typedef typename slist_impl::iterator siterator;
|
||||
typedef typename slist_impl::const_iterator const_siterator;
|
||||
typedef detail::bucket_impl<slist_impl> bucket_type;
|
||||
typedef bucket_impl<slist_impl> bucket_type;
|
||||
|
||||
typedef typename pointer_traits
|
||||
<pointer>::template rebind_pointer
|
||||
< const BucketValueTraits >::type const_bucketvaltraits_ptr;
|
||||
typedef typename slist_impl::size_type size_type;
|
||||
class nat;
|
||||
typedef typename
|
||||
detail::if_c< IsConst
|
||||
, hashtable_iterator<BucketValueTraits, false>
|
||||
, nat>::type nonconst_iterator;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(typename bucket_type::node_ptr p)
|
||||
{
|
||||
@@ -193,12 +195,16 @@ class hashtable_iterator
|
||||
: slist_it_() //Value initialization to achieve "null iterators" (N3644)
|
||||
{}
|
||||
|
||||
explicit hashtable_iterator(siterator ptr, const BucketValueTraits *cont)
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit hashtable_iterator(siterator ptr, const BucketValueTraits *cont)
|
||||
: slist_it_ (ptr)
|
||||
, traitsptr_ (cont ? pointer_traits<const_bucketvaltraits_ptr>::pointer_to(*cont) : const_bucketvaltraits_ptr() )
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const hashtable_iterator<BucketValueTraits, false> &other)
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const hashtable_iterator &other)
|
||||
: slist_it_(other.slist_it()), traitsptr_(other.get_bucket_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const nonconst_iterator &other)
|
||||
: slist_it_(other.slist_it()), traitsptr_(other.get_bucket_value_traits())
|
||||
{}
|
||||
|
||||
@@ -211,7 +217,10 @@ class hashtable_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator& operator++()
|
||||
{ this->increment(); return *this; }
|
||||
|
||||
hashtable_iterator operator++(int)
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator &operator=(const hashtable_iterator &other)
|
||||
{ slist_it_ = other.slist_it(); traitsptr_ = other.get_bucket_value_traits(); return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator operator++(int)
|
||||
{
|
||||
hashtable_iterator result (*this);
|
||||
this->increment();
|
||||
@@ -246,7 +255,7 @@ class hashtable_iterator
|
||||
void increment()
|
||||
{
|
||||
const bucket_traits &rbuck_traits = this->priv_bucket_traits();
|
||||
bucket_type* const buckets = boost::intrusive::detail::to_raw_pointer(rbuck_traits.bucket_begin());
|
||||
bucket_type* const buckets = boost::movelib::to_raw_pointer(rbuck_traits.bucket_begin());
|
||||
const size_type buckets_len = rbuck_traits.bucket_count();
|
||||
|
||||
++slist_it_;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <boost/intrusive/detail/parent_from_member.hpp>
|
||||
#include <boost/intrusive/link_mode.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/detail/to_raw_pointer.hpp>
|
||||
#include <boost/move/detail/to_raw_pointer.hpp>
|
||||
#include <boost/intrusive/detail/node_holder.hpp>
|
||||
|
||||
namespace boost {
|
||||
@@ -57,26 +57,34 @@ struct bhtraits_base
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr & n)
|
||||
{
|
||||
return pointer_traits<pointer>::pointer_to
|
||||
pointer p = pointer_traits<pointer>::pointer_to
|
||||
(static_cast<reference>(static_cast<node_holder_reference>(*n)));
|
||||
BOOST_ASSERT(!!p);
|
||||
return p;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n)
|
||||
{
|
||||
return pointer_traits<const_pointer>::pointer_to
|
||||
const_pointer p = pointer_traits<const_pointer>::pointer_to
|
||||
(static_cast<const_reference>(static_cast<const_node_holder_reference>(*n)));
|
||||
BOOST_ASSERT(!!p);
|
||||
return p;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value)
|
||||
{
|
||||
return pointer_traits<node_ptr>::pointer_to
|
||||
node_ptr p = pointer_traits<node_ptr>::pointer_to
|
||||
(static_cast<node_reference>(static_cast<node_holder_reference>(value)));
|
||||
BOOST_ASSERT(!!p);
|
||||
return p;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value)
|
||||
{
|
||||
return pointer_traits<const_node_ptr>::pointer_to
|
||||
const_node_ptr p = pointer_traits<const_node_ptr>::pointer_to
|
||||
(static_cast<const_node_reference>(static_cast<const_node_holder_reference>(value)));
|
||||
BOOST_ASSERT(!!p);
|
||||
return p;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -128,14 +136,14 @@ struct mhtraits
|
||||
{
|
||||
return pointer_traits<pointer>::pointer_to
|
||||
(*detail::parent_from_member<T, Hook>
|
||||
(static_cast<Hook*>(boost::intrusive::detail::to_raw_pointer(n)), P));
|
||||
(static_cast<Hook*>(boost::movelib::to_raw_pointer(n)), P));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n)
|
||||
{
|
||||
return pointer_traits<const_pointer>::pointer_to
|
||||
(*detail::parent_from_member<T, Hook>
|
||||
(static_cast<const Hook*>(boost::intrusive::detail::to_raw_pointer(n)), P));
|
||||
(static_cast<const Hook*>(boost::movelib::to_raw_pointer(n)), P));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -161,10 +169,10 @@ struct fhtraits
|
||||
static const link_mode_type link_mode = hook_type::hooktags::link_mode;
|
||||
|
||||
static node_ptr to_node_ptr(reference value)
|
||||
{ return static_cast<node*>(boost::intrusive::detail::to_raw_pointer(Functor::to_hook_ptr(value))); }
|
||||
{ return static_cast<node*>(boost::movelib::to_raw_pointer(Functor::to_hook_ptr(value))); }
|
||||
|
||||
static const_node_ptr to_node_ptr(const_reference value)
|
||||
{ return static_cast<const node*>(boost::intrusive::detail::to_raw_pointer(Functor::to_hook_ptr(value))); }
|
||||
{ return static_cast<const node*>(boost::movelib::to_raw_pointer(Functor::to_hook_ptr(value))); }
|
||||
|
||||
static pointer to_value_ptr(const node_ptr & n)
|
||||
{ return Functor::to_value_ptr(to_hook_ptr(n)); }
|
||||
|
||||
@@ -27,6 +27,24 @@
|
||||
#include <boost/move/detail/iterator_traits.hpp>
|
||||
#include <boost/move/detail/meta_utils_core.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace iterators{
|
||||
|
||||
struct incrementable_traversal_tag;
|
||||
struct single_pass_traversal_tag;
|
||||
struct forward_traversal_tag;
|
||||
struct bidirectional_traversal_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
namespace detail{
|
||||
|
||||
template <class Category, class Traversal>
|
||||
struct iterator_category_with_traversal;
|
||||
|
||||
} //namespace boost{
|
||||
} //namespace iterators{
|
||||
} //namespace detail{
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
@@ -45,6 +63,28 @@ struct iterator
|
||||
typedef Reference reference;
|
||||
};
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_[dis|en]able_if_boost_iterator
|
||||
////////////////////////////////////////
|
||||
template<class I>
|
||||
struct is_boost_iterator
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class Category, class Traversal>
|
||||
struct is_boost_iterator< boost::iterators::detail::iterator_category_with_traversal<Category, Traversal> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template<class I, class R = void>
|
||||
struct iterator_enable_if_boost_iterator
|
||||
: ::boost::move_detail::enable_if_c
|
||||
< is_boost_iterator<typename boost::intrusive::iterator_traits<I>::iterator_category >::value
|
||||
, R>
|
||||
{};
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_[dis|en]able_if_tag
|
||||
////////////////////////////////////////
|
||||
@@ -68,6 +108,23 @@ struct iterator_disable_if_tag
|
||||
, R>
|
||||
{};
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_[dis|en]able_if_tag
|
||||
////////////////////////////////////////
|
||||
template<class I, class Tag, class Tag2, class R = void>
|
||||
struct iterator_enable_if_convertible_tag
|
||||
: ::boost::move_detail::enable_if_c
|
||||
< ::boost::move_detail::is_same_or_convertible
|
||||
< typename boost::intrusive::iterator_traits<I>::iterator_category
|
||||
, Tag
|
||||
>::value &&
|
||||
!::boost::move_detail::is_same_or_convertible
|
||||
< typename boost::intrusive::iterator_traits<I>::iterator_category
|
||||
, Tag2
|
||||
>::value
|
||||
, R>
|
||||
{};
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_[dis|en]able_if_tag_difference_type
|
||||
////////////////////////////////////////
|
||||
@@ -84,12 +141,13 @@ struct iterator_disable_if_tag_difference_type
|
||||
////////////////////
|
||||
// advance
|
||||
////////////////////
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
typename iterator_enable_if_tag<InputIt, std::input_iterator_tag>::type
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::input_iterator_tag>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
++it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
@@ -97,17 +155,17 @@ typename iterator_enable_if_tag<InputIt, std::forward_iterator_tag>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
++it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
typename iterator_enable_if_tag<InputIt, std::bidirectional_iterator_tag>::type
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::bidirectional_iterator_tag>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
for (; 0 < n; --n)
|
||||
++it;
|
||||
++it;
|
||||
for (; n < 0; ++n)
|
||||
--it;
|
||||
--it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
@@ -117,6 +175,54 @@ BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::random
|
||||
it += n;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::incrementable_traversal_tag&, const boost::iterators::single_pass_traversal_tag&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::single_pass_traversal_tag &, const boost::iterators::forward_traversal_tag&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::forward_traversal_tag&, const boost::iterators::bidirectional_traversal_tag&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::bidirectional_traversal_tag&, const boost::iterators::random_access_traversal_tag&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
for (; 0 < n; --n)
|
||||
++it;
|
||||
for (; n < 0; ++n)
|
||||
--it;
|
||||
}
|
||||
|
||||
class fake{};
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::random_access_traversal_tag&, const fake&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
it += n;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// distance
|
||||
////////////////////
|
||||
@@ -127,7 +233,7 @@ typename iterator_disable_if_tag_difference_type
|
||||
{
|
||||
typename iterator_traits<InputIt>::difference_type off = 0;
|
||||
while(first != last){
|
||||
++off;
|
||||
++off;
|
||||
++first;
|
||||
}
|
||||
return off;
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
static const bool value = same_type || is_convertible<P1, const_node_ptr>::value;
|
||||
};
|
||||
|
||||
base_t base() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE base_t base() const
|
||||
{ return static_cast<const base_t&>(*this); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE key_nodeptr_comp(KeyTypeKeyCompare kcomp, const ValueTraits *traits)
|
||||
|
||||
@@ -47,6 +47,11 @@ class list_iterator
|
||||
typedef typename types_t::node node;
|
||||
typedef typename types_t::node_ptr node_ptr;
|
||||
typedef typename types_t::const_value_traits_ptr const_value_traits_ptr;
|
||||
class nat;
|
||||
typedef typename
|
||||
detail::if_c< IsConst
|
||||
, list_iterator<value_traits, false>
|
||||
, nat>::type nonconst_iterator;
|
||||
|
||||
public:
|
||||
typedef typename types_t::iterator_type::difference_type difference_type;
|
||||
@@ -62,15 +67,22 @@ class list_iterator
|
||||
: members_(nodeptr, traits_ptr)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator(list_iterator<ValueTraits, false> const& other)
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator(const list_iterator &other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const node_ptr &pointed_node() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator(const nonconst_iterator &other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator &operator=(const list_iterator &other)
|
||||
{ members_.nodeptr_ = other.members_.nodeptr_; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
|
||||
{ return members_.nodeptr_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator &operator=(const node_ptr &node)
|
||||
{ members_.nodeptr_ = node; return static_cast<list_iterator&>(*this); }
|
||||
{ members_.nodeptr_ = node; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
|
||||
{ return members_.get_ptr(); }
|
||||
@@ -115,7 +127,7 @@ class list_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
|
||||
{ return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
|
||||
|
||||
list_iterator<ValueTraits, false> unconst() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator<ValueTraits, false> unconst() const
|
||||
{ return list_iterator<ValueTraits, false>(this->pointed_node(), this->get_value_traits()); }
|
||||
|
||||
private:
|
||||
|
||||
@@ -53,7 +53,7 @@ struct list_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const node_ptr & n)
|
||||
{ return n->prev_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_previous(const node_ptr & n, const node_ptr & prev)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_previous(node_ptr n, node_ptr prev)
|
||||
{ n->prev_ = prev; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
@@ -62,7 +62,7 @@ struct list_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
|
||||
{ return n->next_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
{ n->next_ = next; }
|
||||
};
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ template<class SizeType, class Enabler = void >
|
||||
struct sqrt2_pow_max;
|
||||
|
||||
template <class SizeType>
|
||||
struct sqrt2_pow_max<SizeType, typename enable_if< numbits_eq<SizeType, 32> >::type>
|
||||
struct sqrt2_pow_max<SizeType, typename voider<typename enable_if< numbits_eq<SizeType, 32> >::type>::type>
|
||||
{
|
||||
static const SizeType value = 0xb504f334;
|
||||
static const std::size_t pow = 31;
|
||||
@@ -271,7 +271,7 @@ struct sqrt2_pow_max<SizeType, typename enable_if< numbits_eq<SizeType, 32> >::t
|
||||
#ifndef BOOST_NO_INT64_T
|
||||
|
||||
template <class SizeType>
|
||||
struct sqrt2_pow_max<SizeType, typename enable_if< numbits_eq<SizeType, 64> >::type>
|
||||
struct sqrt2_pow_max<SizeType, typename voider<typename enable_if< numbits_eq<SizeType, 64> >::type>::type>
|
||||
{
|
||||
static const SizeType value = 0xb504f333f9de6484ull;
|
||||
static const std::size_t pow = 63;
|
||||
|
||||
@@ -40,6 +40,7 @@ using boost::move_detail::remove_pointer;
|
||||
using boost::move_detail::add_pointer;
|
||||
using boost::move_detail::true_type;
|
||||
using boost::move_detail::false_type;
|
||||
using boost::move_detail::voider;
|
||||
using boost::move_detail::enable_if_c;
|
||||
using boost::move_detail::enable_if;
|
||||
using boost::move_detail::disable_if_c;
|
||||
@@ -86,8 +87,8 @@ struct ls_zeros<1>
|
||||
|
||||
// Infrastructure for providing a default type for T::TNAME if absent.
|
||||
#define BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(TNAME) \
|
||||
template <typename T, typename DefaultType> \
|
||||
struct boost_intrusive_default_type_ ## TNAME \
|
||||
template <typename T> \
|
||||
struct boost_intrusive_has_type_ ## TNAME \
|
||||
{ \
|
||||
template <typename X> \
|
||||
static char test(int, typename X::TNAME*); \
|
||||
@@ -95,13 +96,18 @@ struct ls_zeros<1>
|
||||
template <typename X> \
|
||||
static int test(...); \
|
||||
\
|
||||
struct DefaultWrap { typedef DefaultType TNAME; }; \
|
||||
\
|
||||
static const bool value = (1 == sizeof(test<T>(0, 0))); \
|
||||
}; \
|
||||
\
|
||||
template <typename T, typename DefaultType> \
|
||||
struct boost_intrusive_default_type_ ## TNAME \
|
||||
{ \
|
||||
struct DefaultWrap { typedef DefaultType TNAME; }; \
|
||||
\
|
||||
typedef typename \
|
||||
::boost::intrusive::detail::if_c \
|
||||
<value, T, DefaultWrap>::type::TNAME type; \
|
||||
< boost_intrusive_has_type_ ## TNAME<T>::value \
|
||||
, T, DefaultWrap>::type::TNAME type; \
|
||||
}; \
|
||||
//
|
||||
|
||||
@@ -110,6 +116,11 @@ struct ls_zeros<1>
|
||||
boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type \
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_TYPE(INSTANTIATION_NS_PREFIX, T, TNAME) \
|
||||
INSTANTIATION_NS_PREFIX \
|
||||
boost_intrusive_has_type_ ## TNAME< T >::value \
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(TNAME)\
|
||||
template <typename T, typename DefaultType> \
|
||||
struct boost_intrusive_eval_default_type_ ## TNAME \
|
||||
|
||||
@@ -59,7 +59,7 @@ struct node_cloner
|
||||
{}
|
||||
|
||||
// tree-based containers use this method, which is proxy-reference friendly
|
||||
node_ptr operator()(const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(const node_ptr & p)
|
||||
{
|
||||
reference_type v = *traits_->to_value_ptr(p);
|
||||
node_ptr n = traits_->to_node_ptr(*base_t::get()(v));
|
||||
@@ -89,7 +89,7 @@ struct node_disposer
|
||||
: base_t(f), traits_(cont)
|
||||
{}
|
||||
|
||||
void operator()(const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void operator()(const node_ptr & p)
|
||||
{
|
||||
if(safemode_or_autounlink)
|
||||
node_algorithms::init(p);
|
||||
|
||||
@@ -59,7 +59,7 @@ struct constptr
|
||||
{}
|
||||
|
||||
const void *get_ptr() const
|
||||
{ return boost::intrusive::detail::to_raw_pointer(const_void_ptr_); }
|
||||
{ return boost::movelib::to_raw_pointer(const_void_ptr_); }
|
||||
|
||||
ConstVoidPtr const_void_ptr_;
|
||||
};
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_POINTER_ELEMENT_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_POINTER_ELEMENT_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail{
|
||||
|
||||
//////////////////////
|
||||
//struct first_param
|
||||
//////////////////////
|
||||
|
||||
template <typename T> struct first_param
|
||||
{ typedef void type; };
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <template <typename, typename...> class TemplateClass, typename T, typename... Args>
|
||||
struct first_param< TemplateClass<T, Args...> >
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#else //C++03 compilers
|
||||
|
||||
template < template //0arg
|
||||
<class
|
||||
> class TemplateClass, class T
|
||||
>
|
||||
struct first_param
|
||||
< TemplateClass<T> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //1arg
|
||||
<class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //2arg
|
||||
<class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //3arg
|
||||
<class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //4arg
|
||||
<class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //5arg
|
||||
<class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //6arg
|
||||
<class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //7arg
|
||||
<class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //8arg
|
||||
<class,class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //9arg
|
||||
<class,class,class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7, P8> >
|
||||
{ typedef T type; };
|
||||
|
||||
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename T>
|
||||
struct has_internal_pointer_element
|
||||
{
|
||||
template <typename X>
|
||||
static char test(int, typename X::element_type*);
|
||||
|
||||
template <typename X>
|
||||
static int test(...);
|
||||
|
||||
static const bool value = (1 == sizeof(test<T>(0, 0)));
|
||||
};
|
||||
|
||||
template<class Ptr, bool = has_internal_pointer_element<Ptr>::value>
|
||||
struct pointer_element_impl
|
||||
{
|
||||
typedef typename Ptr::element_type type;
|
||||
};
|
||||
|
||||
template<class Ptr>
|
||||
struct pointer_element_impl<Ptr, false>
|
||||
{
|
||||
typedef typename boost::intrusive::detail::first_param<Ptr>::type type;
|
||||
};
|
||||
|
||||
} //namespace detail{
|
||||
|
||||
template <typename Ptr>
|
||||
struct pointer_element
|
||||
{
|
||||
typedef typename ::boost::intrusive::detail::pointer_element_impl<Ptr>::type type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct pointer_element<T*>
|
||||
{ typedef T type; };
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif // defined(BOOST_INTRUSIVE_DETAIL_POINTER_ELEMENT_HPP)
|
||||
@@ -80,7 +80,7 @@ struct default_rbtree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->parent_ = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
@@ -89,7 +89,7 @@ struct default_rbtree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
@@ -98,7 +98,7 @@ struct default_rbtree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
|
||||
@@ -136,7 +136,7 @@ struct compact_rbtree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
|
||||
{ return ptr_bit::get_pointer(n->parent_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ ptr_bit::set_pointer(n->parent_, p); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
@@ -145,7 +145,7 @@ struct compact_rbtree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
@@ -154,7 +154,7 @@ struct compact_rbtree_node_traits_impl
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
|
||||
|
||||
@@ -39,7 +39,7 @@ class init_disposer
|
||||
typedef typename NodeAlgorithms::node_ptr node_ptr;
|
||||
|
||||
public:
|
||||
void operator()(const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void operator()(const node_ptr & p)
|
||||
{ NodeAlgorithms::init(p); }
|
||||
};
|
||||
|
||||
|
||||
@@ -49,6 +49,11 @@ class slist_iterator
|
||||
typedef typename types_t::node node;
|
||||
typedef typename types_t::node_ptr node_ptr;
|
||||
typedef typename types_t::const_value_traits_ptr const_value_traits_ptr;
|
||||
class nat;
|
||||
typedef typename
|
||||
detail::if_c< IsConst
|
||||
, slist_iterator<value_traits, false>
|
||||
, nat>::type nonconst_iterator;
|
||||
|
||||
public:
|
||||
typedef typename types_t::iterator_type::difference_type difference_type;
|
||||
@@ -64,11 +69,18 @@ class slist_iterator
|
||||
: members_(nodeptr, traits_ptr)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator(slist_iterator<ValueTraits, false> const& other)
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator(const slist_iterator &other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const node_ptr &pointed_node() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator(const nonconst_iterator &other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator &operator=(const slist_iterator &other)
|
||||
{ members_.nodeptr_ = other.members_.nodeptr_; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
|
||||
{ return members_.nodeptr_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator &operator=(const node_ptr &node)
|
||||
|
||||
@@ -52,7 +52,7 @@ struct slist_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
|
||||
{ return n->next_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
{ n->next_ = next; }
|
||||
};
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_TO_RAW_POINTER_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_TO_RAW_POINTER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/pointer_element.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template <class T>
|
||||
BOOST_INTRUSIVE_FORCEINLINE T* to_raw_pointer(T* p)
|
||||
{ return p; }
|
||||
|
||||
template <class Pointer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename boost::intrusive::pointer_element<Pointer>::type*
|
||||
to_raw_pointer(const Pointer &p)
|
||||
{ return boost::intrusive::detail::to_raw_pointer(p.operator->()); }
|
||||
|
||||
} //namespace detail
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_UTILITIES_HPP
|
||||
@@ -55,6 +55,11 @@ class tree_iterator
|
||||
|
||||
void unspecified_bool_type_func() const {}
|
||||
typedef void (tree_iterator::*unspecified_bool_type)() const;
|
||||
class nat;
|
||||
typedef typename
|
||||
detail::if_c< IsConst
|
||||
, tree_iterator<value_traits, false>
|
||||
, nat>::type nonconst_iterator;
|
||||
|
||||
public:
|
||||
typedef typename types_t::iterator_type::difference_type difference_type;
|
||||
@@ -70,21 +75,28 @@ class tree_iterator
|
||||
: members_(nodeptr, traits_ptr)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator(tree_iterator<value_traits, false> const& other)
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator(const tree_iterator &other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const node_ptr &pointed_node() const
|
||||
{ return members_.nodeptr_; }
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator(const nonconst_iterator &other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const tree_iterator &other)
|
||||
{ members_.nodeptr_ = other.members_.nodeptr_; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const node_ptr &nodeptr)
|
||||
{ members_.nodeptr_ = nodeptr; return static_cast<tree_iterator&>(*this); }
|
||||
{ members_.nodeptr_ = nodeptr; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
|
||||
{ return members_.nodeptr_; }
|
||||
|
||||
public:
|
||||
tree_iterator& operator++()
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator& operator++()
|
||||
{
|
||||
members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
tree_iterator operator++(int)
|
||||
@@ -94,10 +106,10 @@ class tree_iterator
|
||||
return result;
|
||||
}
|
||||
|
||||
tree_iterator& operator--()
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator& operator--()
|
||||
{
|
||||
members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
tree_iterator operator--(int)
|
||||
@@ -110,19 +122,19 @@ class tree_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_left()
|
||||
{
|
||||
members_.nodeptr_ = node_traits::get_left(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_right()
|
||||
{
|
||||
members_.nodeptr_ = node_traits::get_right(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_parent()
|
||||
{
|
||||
members_.nodeptr_ = node_traits::get_parent(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE operator unspecified_bool_type() const
|
||||
|
||||
@@ -50,7 +50,7 @@ struct tree_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->parent_ = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
@@ -59,7 +59,7 @@ struct tree_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
@@ -68,7 +68,7 @@ struct tree_node_traits
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
};
|
||||
|
||||
|
||||
@@ -37,19 +37,22 @@ struct disable_if_smartref_to
|
||||
|| detail::is_same
|
||||
<From, typename pointer_traits
|
||||
< typename pointer_rebind
|
||||
<ValuePtr, const typename pointer_element<ValuePtr>::type>::type>
|
||||
< ValuePtr
|
||||
, const typename boost::movelib::pointer_element<ValuePtr>::type>::type>
|
||||
::reference>::value
|
||||
>
|
||||
{};
|
||||
|
||||
//This function object takes a KeyCompare function object
|
||||
//and compares values that contains keys using KeyOfValue
|
||||
template< class ValuePtr, class KeyCompare, class KeyOfValue
|
||||
, bool = boost::intrusive::detail::is_same<typename pointer_element<ValuePtr>::type, typename KeyOfValue::type>::value >
|
||||
template< class ValuePtr, class KeyCompare, class KeyOfValue, class Ret = bool
|
||||
, bool = boost::intrusive::detail::is_same
|
||||
<typename boost::movelib::pointer_element<ValuePtr>::type, typename KeyOfValue::type>::value >
|
||||
struct tree_value_compare
|
||||
: public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
|
||||
{
|
||||
typedef typename pointer_element<ValuePtr>::type value_type;
|
||||
typedef typename
|
||||
boost::movelib::pointer_element<ValuePtr>::type value_type;
|
||||
typedef KeyCompare key_compare;
|
||||
typedef KeyOfValue key_of_value;
|
||||
typedef typename KeyOfValue::type key_type;
|
||||
@@ -77,44 +80,56 @@ struct tree_value_compare
|
||||
BOOST_INTRUSIVE_FORCEINLINE const key_compare &key_comp() const
|
||||
{ return static_cast<const key_compare &>(*this); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key) const
|
||||
{ return this->key_comp()(key); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const value_type &value) const
|
||||
{ return this->key_comp()(KeyOfValue()(value)); }
|
||||
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const U &nonkey
|
||||
, typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
|
||||
{ return this->key_comp()(nonkey); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key1, const key_type &key2) const
|
||||
{ return this->key_comp()(key1, key2); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const value_type &value1, const value_type &value2) const
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const value_type &value1, const value_type &value2) const
|
||||
{ return this->key_comp()(KeyOfValue()(value1), KeyOfValue()(value2)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const value_type &value2) const
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key1, const value_type &value2) const
|
||||
{ return this->key_comp()(key1, KeyOfValue()(value2)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const value_type &value1, const key_type &key2) const
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const value_type &value1, const key_type &key2) const
|
||||
{ return this->key_comp()(KeyOfValue()(value1), key2); }
|
||||
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()( const key_type &key1, const U &nonkey2
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const key_type &key1, const U &nonkey2
|
||||
, typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
|
||||
{ return this->key_comp()(key1, nonkey2); }
|
||||
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()( const U &nonkey1, const key_type &key2
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const U &nonkey1, const key_type &key2
|
||||
, typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
|
||||
{ return this->key_comp()(nonkey1, key2); }
|
||||
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()( const value_type &value1, const U &nonvalue2
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const value_type &value1, const U &nonvalue2
|
||||
, typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
|
||||
{ return this->key_comp()(KeyOfValue()(value1), nonvalue2); }
|
||||
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()( const U &nonvalue1, const value_type &value2
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const U &nonvalue1, const value_type &value2
|
||||
, typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
|
||||
{ return this->key_comp()(nonvalue1, KeyOfValue()(value2)); }
|
||||
};
|
||||
|
||||
template<class ValuePtr, class KeyCompare, class KeyOfValue>
|
||||
struct tree_value_compare<ValuePtr, KeyCompare, KeyOfValue, true>
|
||||
template<class ValuePtr, class KeyCompare, class KeyOfValue, class Ret>
|
||||
struct tree_value_compare<ValuePtr, KeyCompare, KeyOfValue, Ret, true>
|
||||
: public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
|
||||
{
|
||||
typedef typename pointer_element<ValuePtr>::type value_type;
|
||||
typedef typename
|
||||
boost::movelib::pointer_element<ValuePtr>::type value_type;
|
||||
typedef KeyCompare key_compare;
|
||||
typedef KeyOfValue key_of_value;
|
||||
typedef typename KeyOfValue::type key_type;
|
||||
@@ -143,16 +158,24 @@ struct tree_value_compare<ValuePtr, KeyCompare, KeyOfValue, true>
|
||||
BOOST_INTRUSIVE_FORCEINLINE const key_compare &key_comp() const
|
||||
{ return static_cast<const key_compare &>(*this); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key) const
|
||||
{ return this->key_comp()(key); }
|
||||
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const U &nonkey
|
||||
, typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
|
||||
{ return this->key_comp()(nonkey); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key1, const key_type &key2) const
|
||||
{ return this->key_comp()(key1, key2); }
|
||||
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()( const key_type &key1, const U &nonkey2
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const key_type &key1, const U &nonkey2
|
||||
, typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
|
||||
{ return this->key_comp()(key1, nonkey2); }
|
||||
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2
|
||||
BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const U &nonkey1, const key_type &key2
|
||||
, typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
|
||||
{ return this->key_comp()(nonkey1, key2); }
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#define BOOST_INTRUSIVE_I ,
|
||||
#define BOOST_INTRUSIVE_DOCIGN(T1) T1
|
||||
|
||||
#define BOOST_INTRUSIVE_DISABLE_FORCEINLINE
|
||||
//#define BOOST_INTRUSIVE_DISABLE_FORCEINLINE
|
||||
|
||||
#if defined(BOOST_INTRUSIVE_DISABLE_FORCEINLINE)
|
||||
#define BOOST_INTRUSIVE_FORCEINLINE inline
|
||||
|
||||
Reference in New Issue
Block a user