summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/intrusive/detail')
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/assert.hpp41
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/common_slist_algorithms.hpp99
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/config_begin.hpp2
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/config_end.hpp2
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/ebo_functor_holder.hpp95
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/function_detector.hpp88
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/generic_hook.hpp190
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/has_member_function_callable_with.hpp178
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/is_stateful_value_traits.hpp77
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/memory_util.hpp40
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/mpl.hpp125
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/parent_from_member.hpp117
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/preprocessor.hpp4
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/slist_node.hpp145
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/utilities.hpp1279
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/workaround.hpp8
16 files changed, 2338 insertions, 152 deletions
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/assert.hpp b/3rdParty/Boost/src/boost/intrusive/detail/assert.hpp
new file mode 100644
index 0000000..d75d225
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/assert.hpp
@@ -0,0 +1,41 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// 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_ASSERT_HPP
+#define BOOST_INTRUSIVE_DETAIL_ASSERT_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#if !defined(BOOST_INTRUSIVE_INVARIANT_ASSERT)
+ #include <boost/assert.hpp>
+ #define BOOST_INTRUSIVE_INVARIANT_ASSERT BOOST_ASSERT
+#elif defined(BOOST_INTRUSIVE_INVARIANT_ASSERT_INCLUDE)
+ #include BOOST_INTRUSIVE_INVARIANT_ASSERT_INCLUDE
+#endif
+
+#if !defined(BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT)
+ #include <boost/assert.hpp>
+ #define BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT BOOST_ASSERT
+#elif defined(BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT_INCLUDE)
+ #include BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT_INCLUDE
+#endif
+
+#if !defined(BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT)
+ #include <boost/assert.hpp>
+ #define BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT BOOST_ASSERT
+#elif defined(BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT_INCLUDE)
+ #include BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT_INCLUDE
+#endif
+
+#endif //BOOST_INTRUSIVE_DETAIL_ASSERT_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/common_slist_algorithms.hpp b/3rdParty/Boost/src/boost/intrusive/detail/common_slist_algorithms.hpp
new file mode 100644
index 0000000..0adbd50
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/common_slist_algorithms.hpp
@@ -0,0 +1,99 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2013
+//
+// 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_COMMON_SLIST_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <cstddef>
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+template<class NodeTraits>
+class common_slist_algorithms
+{
+ public:
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+ typedef NodeTraits node_traits;
+
+ static node_ptr get_previous_node(node_ptr p, const node_ptr & this_node)
+ {
+ for( node_ptr p_next
+ ; this_node != (p_next = NodeTraits::get_next(p))
+ ; p = p_next){
+ //Logic error: possible use of linear lists with
+ //operations only permitted with lists
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(p);
+ }
+ return p;
+ }
+
+ static void init(const node_ptr & this_node)
+ { NodeTraits::set_next(this_node, node_ptr()); }
+
+ static bool unique(const const_node_ptr & this_node)
+ {
+ node_ptr next = NodeTraits::get_next(this_node);
+ return !next || next == this_node;
+ }
+
+ static bool inited(const const_node_ptr & this_node)
+ { return !NodeTraits::get_next(this_node); }
+
+ static void unlink_after(const node_ptr & prev_node)
+ {
+ const_node_ptr this_node(NodeTraits::get_next(prev_node));
+ NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
+ }
+
+ static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node)
+ { NodeTraits::set_next(prev_node, last_node); }
+
+ static void link_after(const node_ptr & prev_node, const node_ptr & this_node)
+ {
+ NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
+ NodeTraits::set_next(prev_node, this_node);
+ }
+
+ static void incorporate_after(const node_ptr & bp, const node_ptr & b, const 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)
+ {
+ if (bp != bb && bp != be && bb != be) {
+ node_ptr next_b = NodeTraits::get_next(bb);
+ node_ptr next_e = NodeTraits::get_next(be);
+ node_ptr next_p = NodeTraits::get_next(bp);
+ NodeTraits::set_next(bb, next_e);
+ NodeTraits::set_next(be, next_p);
+ NodeTraits::set_next(bp, next_b);
+ }
+ }
+};
+
+} //namespace detail
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/config_begin.hpp b/3rdParty/Boost/src/boost/intrusive/detail/config_begin.hpp
index 7d15336..109a590 100644
--- a/3rdParty/Boost/src/boost/intrusive/detail/config_begin.hpp
+++ b/3rdParty/Boost/src/boost/intrusive/detail/config_begin.hpp
@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2006-2012
+// (C) Copyright Ion Gaztanaga 2006-2013
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/config_end.hpp b/3rdParty/Boost/src/boost/intrusive/detail/config_end.hpp
index d653030..a081443 100644
--- a/3rdParty/Boost/src/boost/intrusive/detail/config_end.hpp
+++ b/3rdParty/Boost/src/boost/intrusive/detail/config_end.hpp
@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2006-2012
+// (C) Copyright Ion Gaztanaga 2006-2013
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/ebo_functor_holder.hpp b/3rdParty/Boost/src/boost/intrusive/detail/ebo_functor_holder.hpp
new file mode 100644
index 0000000..3c2959b
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/ebo_functor_holder.hpp
@@ -0,0 +1,95 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Joaquin M Lopez Munoz 2006-2013
+//
+// 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_EBO_HOLDER_HPP
+#define BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+template<typename T, bool IsEmpty = true>
+class ebo_functor_holder_impl
+{
+ public:
+ ebo_functor_holder_impl()
+ {}
+ ebo_functor_holder_impl(const T& t)
+ : t_(t)
+ {}
+ template<class Arg1, class Arg2>
+ ebo_functor_holder_impl(const Arg1& arg1, const Arg2& arg2)
+ : t_(arg1, arg2)
+ {}
+
+ T& get(){return t_;}
+ const T& get()const{return t_;}
+
+ private:
+ T t_;
+};
+
+template<typename T>
+class ebo_functor_holder_impl<T, false>
+ : public T
+{
+ public:
+ ebo_functor_holder_impl()
+ {}
+ ebo_functor_holder_impl(const T& t)
+ : T(t)
+ {}
+ template<class Arg1, class Arg2>
+ ebo_functor_holder_impl(const Arg1& arg1, const Arg2& arg2)
+ : T(arg1, arg2)
+ {}
+
+ T& get(){return *this;}
+ const T& get()const{return *this;}
+};
+
+template<typename T>
+class ebo_functor_holder
+ : public ebo_functor_holder_impl<T, is_unary_or_binary_function<T>::value>
+{
+ private:
+ typedef ebo_functor_holder_impl<T, is_unary_or_binary_function<T>::value> super;
+
+ public:
+ ebo_functor_holder(){}
+ ebo_functor_holder(const T& t)
+ : super(t)
+ {}
+
+ template<class Arg1, class Arg2>
+ ebo_functor_holder(const Arg1& arg1, const Arg2& arg2)
+ : super(arg1, arg2)
+ {}
+
+ ebo_functor_holder& operator=(const ebo_functor_holder& x)
+ {
+ this->get()=x.get();
+ return *this;
+ }
+};
+
+
+} //namespace detail {
+} //namespace intrusive {
+} //namespace boost {
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/function_detector.hpp b/3rdParty/Boost/src/boost/intrusive/detail/function_detector.hpp
new file mode 100644
index 0000000..f8eccf9
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/function_detector.hpp
@@ -0,0 +1,88 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2009-2013.
+//
+// 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.
+//
+/////////////////////////////////////////////////////////////////////////////
+// This code was modified from the code posted by Alexandre Courpron in his
+// article "Interface Detection" in The Code Project:
+// http://www.codeproject.com/KB/architecture/Detector.aspx
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2007 Alexandre Courpron
+//
+// Permission to use, copy, modify, redistribute and sell this software,
+// provided that this copyright notice appears on all copies of the software.
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_DETAIL_FUNCTION_DETECTOR_HPP
+#define BOOST_INTRUSIVE_DETAIL_FUNCTION_DETECTOR_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+
+namespace boost {
+namespace intrusive {
+namespace function_detector {
+
+ typedef char NotFoundType;
+ struct StaticFunctionType { NotFoundType x [2]; };
+ struct NonStaticFunctionType { NotFoundType x [3]; };
+
+ enum
+ { NotFound = 0,
+ StaticFunction = sizeof( StaticFunctionType ) - sizeof( NotFoundType ),
+ NonStaticFunction = sizeof( NonStaticFunctionType ) - sizeof( NotFoundType )
+ };
+
+} //namespace boost {
+} //namespace intrusive {
+} //namespace function_detector {
+
+#define BOOST_INTRUSIVE_CREATE_FUNCTION_DETECTOR(Identifier, InstantiationKey) \
+ namespace boost { \
+ namespace intrusive { \
+ namespace function_detector { \
+ template < class T, \
+ class NonStaticType, \
+ class NonStaticConstType, \
+ class StaticType > \
+ class DetectMember_##InstantiationKey_##Identifier { \
+ template < NonStaticType > \
+ struct TestNonStaticNonConst ; \
+ \
+ template < NonStaticConstType > \
+ struct TestNonStaticConst ; \
+ \
+ template < StaticType > \
+ struct TestStatic ; \
+ \
+ template <class U > \
+ static NonStaticFunctionType Test( TestNonStaticNonConst<&U::Identifier>*, int ); \
+ \
+ template <class U > \
+ static NonStaticFunctionType Test( TestNonStaticConst<&U::Identifier>*, int ); \
+ \
+ template <class U> \
+ static StaticFunctionType Test( TestStatic<&U::Identifier>*, int ); \
+ \
+ template <class U> \
+ static NotFoundType Test( ... ); \
+ public : \
+ static const int check = NotFound + (sizeof(Test<T>(0, 0)) - sizeof(NotFoundType));\
+ };\
+}}} //namespace boost::intrusive::function_detector {
+
+#define BOOST_INTRUSIVE_DETECT_FUNCTION(Class, InstantiationKey, ReturnType, Identifier, Params) \
+ ::boost::intrusive::function_detector::DetectMember_##InstantiationKey_##Identifier< Class,\
+ ReturnType (Class::*)Params,\
+ ReturnType (Class::*)Params const,\
+ ReturnType (*)Params \
+ >::check
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //@ifndef BOOST_INTRUSIVE_DETAIL_FUNCTION_DETECTOR_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/generic_hook.hpp b/3rdParty/Boost/src/boost/intrusive/detail/generic_hook.hpp
new file mode 100644
index 0000000..835a8c7
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/generic_hook.hpp
@@ -0,0 +1,190 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2013
+//
+// 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_GENERIC_HOOK_HPP
+#define BOOST_INTRUSIVE_GENERIC_HOOK_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/utilities.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+enum base_hook_type
+{ NoBaseHookId
+, ListBaseHookId
+, SlistBaseHookId
+, RbTreeBaseHookId
+, HashBaseHookId
+, AvlTreeBaseHookId
+, BsTreeBaseHookId
+, TreapTreeBaseHookId
+, AnyBaseHookId
+};
+
+
+template <class HookTags, unsigned int>
+struct hook_tags_definer{};
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, ListBaseHookId>
+{ typedef HookTags default_list_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, SlistBaseHookId>
+{ typedef HookTags default_slist_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, RbTreeBaseHookId>
+{ typedef HookTags default_rbtree_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, HashBaseHookId>
+{ typedef HookTags default_hashtable_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, AvlTreeBaseHookId>
+{ typedef HookTags default_avltree_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, BsTreeBaseHookId>
+{ typedef HookTags default_bstree_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, AnyBaseHookId>
+{ typedef HookTags default_any_hook; };
+
+template
+ < class NodeTraits
+ , class Tag
+ , link_mode_type LinkMode
+ , base_hook_type BaseHookType
+ >
+struct hooktags_impl
+{
+ static const link_mode_type link_mode = LinkMode;
+ typedef Tag tag;
+ typedef NodeTraits node_traits;
+ static const bool is_base_hook = !detail::is_same<Tag, member_tag>::value;
+ static const bool safemode_or_autounlink = is_safe_autounlink<link_mode>::value;
+ static const unsigned int type = BaseHookType;
+};
+
+/// @endcond
+
+template
+ < class GetNodeAlgorithms
+ , class Tag
+ , link_mode_type LinkMode
+ , base_hook_type BaseHookType
+ >
+class generic_hook
+ /// @cond
+ //If the hook is a base hook, derive generic hook from node_holder
+ //so that a unique base class is created to convert from the node
+ //to the type. This mechanism will be used by bhtraits.
+ //
+ //If the hook is a member hook, generic hook will directly derive
+ //from the hook.
+ : public detail::if_c
+ < detail::is_same<Tag, member_tag>::value
+ , typename GetNodeAlgorithms::type::node
+ , node_holder<typename GetNodeAlgorithms::type::node, Tag, BaseHookType>
+ >::type
+ //If this is the a default-tagged base hook derive from a class that
+ //will define an special internal typedef. Containers will be able to detect this
+ //special typedef and obtain generic_hook's internal types in order to deduce
+ //value_traits for this hook.
+ , public hook_tags_definer
+ < generic_hook<GetNodeAlgorithms, Tag, LinkMode, BaseHookType>
+ , detail::is_same<Tag, default_tag>::value*BaseHookType>
+ /// @endcond
+{
+ /// @cond
+ typedef typename GetNodeAlgorithms::type node_algorithms;
+ typedef typename node_algorithms::node node;
+ typedef typename node_algorithms::node_ptr node_ptr;
+ typedef typename node_algorithms::const_node_ptr const_node_ptr;
+
+ public:
+
+ typedef hooktags_impl
+ < typename GetNodeAlgorithms::type::node_traits
+ , Tag, LinkMode, BaseHookType> hooktags;
+
+ node_ptr this_ptr()
+ { return pointer_traits<node_ptr>::pointer_to(static_cast<node&>(*this)); }
+
+ const_node_ptr this_ptr() const
+ { return pointer_traits<const_node_ptr>::pointer_to(static_cast<const node&>(*this)); }
+
+ public:
+ /// @endcond
+
+ generic_hook()
+ {
+ if(hooktags::safemode_or_autounlink){
+ node_algorithms::init(this->this_ptr());
+ }
+ }
+
+ generic_hook(const generic_hook& )
+ {
+ if(hooktags::safemode_or_autounlink){
+ node_algorithms::init(this->this_ptr());
+ }
+ }
+
+ generic_hook& operator=(const generic_hook& )
+ { return *this; }
+
+ ~generic_hook()
+ {
+ destructor_impl
+ (*this, detail::link_dispatch<hooktags::link_mode>());
+ }
+
+ void swap_nodes(generic_hook &other)
+ {
+ node_algorithms::swap_nodes
+ (this->this_ptr(), other.this_ptr());
+ }
+
+ 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_STATIC_ASSERT(( (int)hooktags::link_mode == (int)auto_unlink ));
+ node_algorithms::unlink(this->this_ptr());
+ node_algorithms::init(this->this_ptr());
+ }
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_GENERIC_HOOK_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/has_member_function_callable_with.hpp b/3rdParty/Boost/src/boost/intrusive/detail/has_member_function_callable_with.hpp
index 6516e28..12eec96 100644
--- a/3rdParty/Boost/src/boost/intrusive/detail/has_member_function_callable_with.hpp
+++ b/3rdParty/Boost/src/boost/intrusive/detail/has_member_function_callable_with.hpp
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2011-2013. 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)
//
@@ -18,6 +18,7 @@
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/detail/workaround.hpp>
#include <boost/intrusive/detail/preprocessor.hpp>
+ #include <boost/intrusive/detail/mpl.hpp>
#include <boost/static_assert.hpp>
#include <boost/move/move.hpp>
@@ -69,11 +70,11 @@
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END not defined!"
#endif
- #if BOOST_PP_ITERATION_START() != 0
- #error "BOOST_PP_ITERATION_START() must be zero (0)"
+ #if BOOST_PP_ITERATION_START() > BOOST_PP_ITERATION_FINISH()
+ #error "BOOST_PP_ITERATION_START() must be <= BOOST_PP_ITERATION_FINISH()"
#endif
- #if BOOST_PP_ITERATION() == 0
+ #if BOOST_PP_ITERATION() == BOOST_PP_ITERATION_START()
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
@@ -85,7 +86,7 @@
void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME();
};
- struct Base : public Type, public BaseMixin { Base(); };
+ struct Base : public ::boost::intrusive::detail::remove_cv<Type>::type, public BaseMixin { Base(); };
template <typename T, T t> class Helper{};
template <typename U>
@@ -113,76 +114,7 @@
};
//!
- #if !defined(_MSC_VER) || (_MSC_VER < 1600)
-
- #if defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
-
- template<typename Fun>
- struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
- <Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
- {
- //Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
- //wrong SFINAE for GCC 4.2/4.3
- static const bool value = true;
- };
-
- #else //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
-
- //Special case for 0 args
- template< class F
- , std::size_t N =
- sizeof((boost::move_detail::declval<F>().
- BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME (), 0))>
- struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
- {
- boost_intrusive_has_member_function_callable_with::yes_type dummy;
- BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
- };
-
- //For buggy compilers like MSVC 7.1+ ((F*)0)->func() does not
- //SFINAE-out the zeroarg_checker_ instantiation but sizeof yields to 0.
- template<class F>
- struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<F, 0>
- {
- boost_intrusive_has_member_function_callable_with::no_type dummy;
- BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
- };
-
- template<typename Fun>
- struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
- <Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
- {
- template<class U>
- static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>
- Test(BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
-
- template <class U>
- static boost_intrusive_has_member_function_callable_with::no_type Test(...);
-
- static const bool value = sizeof(Test< Fun >(0))
- == sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
- };
- #endif //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
-
- #else //#if !defined(_MSC_VER) || (_MSC_VER < 1600)
- template<typename Fun>
- struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
- <Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
- {
- template<class U>
- static decltype( boost::move_detail::declval<Fun>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()
- , boost_intrusive_has_member_function_callable_with::yes_type())
- Test(Fun*);
-
- template<class U>
- static boost_intrusive_has_member_function_callable_with::no_type Test(...);
-
- static const bool value = sizeof(Test<Fun>(0))
- == sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
- };
- #endif //#if !defined(_MSC_VER) || (_MSC_VER < 1600)
-
- #else //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
+ #else //!defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
template<typename Fun, bool HasFunc, class ...Args>
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl);
@@ -194,6 +126,8 @@
static const bool value = false;
};
+ #ifdef BOOST_NO_CXX11_DECLTYPE
+
//Special case for 0 args
template< class F
, std::size_t N =
@@ -214,14 +148,21 @@
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
};
+ #endif //#ifdef BOOST_NO_CXX11_DECLTYPE
+
template<typename Fun>
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
<Fun, true>
{
+ #ifndef BOOST_NO_CXX11_DECLTYPE
+ template<class U, class V = decltype(boost::move_detail::declval<U>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()) >
+ static boost_intrusive_has_member_function_callable_with::yes_type Test(U*);
+ #else
template<class U>
- static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
+ static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
<U> Test(BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
-
+ #endif
+
template <class U>
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
@@ -274,6 +215,89 @@
, Args... >
{};
+ #endif //!defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
+
+ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
+
+ #endif //BOOST_PP_ITERATION() == BOOST_PP_ITERATION_START()
+
+ #if BOOST_PP_ITERATION() == 0
+
+ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
+
+ #if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
+
+ #if !defined(_MSC_VER) || (_MSC_VER < 1600)
+
+ #if defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
+
+ template<typename Fun>
+ struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
+ <Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
+ {
+ //Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
+ //wrong SFINAE for GCC 4.2/4.3
+ static const bool value = true;
+ };
+
+ #else //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
+
+ //Special case for 0 args
+ template< class F
+ , std::size_t N =
+ sizeof((boost::move_detail::declval<F>().
+ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME (), 0))>
+ struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
+ {
+ boost_intrusive_has_member_function_callable_with::yes_type dummy;
+ BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
+ };
+
+ //For buggy compilers like MSVC 7.1+ ((F*)0)->func() does not
+ //SFINAE-out the zeroarg_checker_ instantiation but sizeof yields to 0.
+ template<class F>
+ struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<F, 0>
+ {
+ boost_intrusive_has_member_function_callable_with::no_type dummy;
+ BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
+ };
+
+ template<typename Fun>
+ struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
+ <Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
+ {
+ template<class U>
+ static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>
+ Test(BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
+
+ template <class U>
+ static boost_intrusive_has_member_function_callable_with::no_type Test(...);
+
+ static const bool value = sizeof(Test< Fun >(0))
+ == sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
+ };
+ #endif //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
+
+ #else //#if !defined(_MSC_VER) || (_MSC_VER < 1600)
+ template<typename Fun>
+ struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
+ <Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
+ {
+ template<class U>
+ static decltype( boost::move_detail::declval<U>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()
+ , boost_intrusive_has_member_function_callable_with::yes_type())
+ Test(U*);
+
+ template<class U>
+ static boost_intrusive_has_member_function_callable_with::no_type Test(...);
+
+ static const bool value = sizeof(Test<Fun>(0))
+ == sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
+ };
+ #endif //#if !defined(_MSC_VER) || (_MSC_VER < 1600)
+
+ #else //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
+
#endif //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/is_stateful_value_traits.hpp b/3rdParty/Boost/src/boost/intrusive/detail/is_stateful_value_traits.hpp
new file mode 100644
index 0000000..c98f6c6
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/is_stateful_value_traits.hpp
@@ -0,0 +1,77 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2009-2013.
+//
+// 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_IS_STATEFUL_VALUE_TRAITS_HPP
+#define BOOST_INTRUSIVE_DETAIL_IS_STATEFUL_VALUE_TRAITS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+
+#if defined(_MSC_VER) && (_MSC_VER <= 1310)
+
+#include <boost/intrusive/detail/mpl.hpp>
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+template<class ValueTraits>
+struct is_stateful_value_traits
+{
+ static const bool value = !detail::is_empty_class<ValueTraits>::value;
+};
+
+}}}
+
+#else
+
+#include <boost/intrusive/detail/function_detector.hpp>
+
+BOOST_INTRUSIVE_CREATE_FUNCTION_DETECTOR(to_node_ptr, boost_intrusive)
+BOOST_INTRUSIVE_CREATE_FUNCTION_DETECTOR(to_value_ptr, boost_intrusive)
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+template<class ValueTraits>
+struct is_stateful_value_traits
+{
+ typedef typename ValueTraits::node_ptr node_ptr;
+ typedef typename ValueTraits::pointer pointer;
+ typedef typename ValueTraits::value_type value_type;
+ typedef typename ValueTraits::const_node_ptr const_node_ptr;
+ typedef typename ValueTraits::const_pointer const_pointer;
+
+ typedef ValueTraits value_traits;
+
+ static const bool value =
+ (boost::intrusive::function_detector::NonStaticFunction ==
+ (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, node_ptr, to_node_ptr, (value_type&) )))
+ ||
+ (boost::intrusive::function_detector::NonStaticFunction ==
+ (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, pointer, to_value_ptr, (node_ptr) )))
+ ||
+ (boost::intrusive::function_detector::NonStaticFunction ==
+ (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, const_node_ptr, to_node_ptr, (const value_type&) )))
+ ||
+ (boost::intrusive::function_detector::NonStaticFunction ==
+ (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, const_pointer, to_value_ptr, (const_node_ptr) )))
+ ;
+};
+
+}}}
+
+#endif
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //@ifndef BOOST_INTRUSIVE_DETAIL_IS_STATEFUL_VALUE_TRAITS_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/memory_util.hpp b/3rdParty/Boost/src/boost/intrusive/detail/memory_util.hpp
index 1a6431b..49b69cf 100644
--- a/3rdParty/Boost/src/boost/intrusive/detail/memory_util.hpp
+++ b/3rdParty/Boost/src/boost/intrusive/detail/memory_util.hpp
@@ -6,7 +6,7 @@
//
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2011-2013. 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)
//
@@ -17,7 +17,7 @@
#ifndef BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP
#define BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -45,6 +45,10 @@ template <typename T> struct unvoid { typedef T type; };
template <> struct unvoid<void> { struct type { }; };
template <> struct unvoid<const void> { struct type { }; };
+template <typename T> struct unvoid_ref { typedef T &type; };
+template <> struct unvoid_ref<void> { struct type_impl { }; typedef type_impl & type; };
+template <> struct unvoid_ref<const void> { struct type_impl { }; typedef type_impl & type; };
+
template <typename T>
struct LowPriorityConversion
{
@@ -61,8 +65,7 @@ struct LowPriorityConversion
static char test(int, typename X::TNAME*); \
\
template <typename X> \
- static int test(boost::intrusive::detail:: \
- LowPriorityConversion<int>, void*); \
+ static int test(...); \
\
struct DefaultWrap { typedef DefaultType TNAME; }; \
\
@@ -80,8 +83,7 @@ struct LowPriorityConversion
static char test(int, typename X::TNAME*); \
\
template <typename X> \
- static int test(boost::intrusive::detail:: \
- LowPriorityConversion<int>, void*); \
+ static int test(...); \
\
struct DefaultWrap \
{ typedef typename DefaultType::type TNAME; }; \
@@ -114,25 +116,25 @@ struct LowPriorityConversion
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME pointer_to
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
+#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
#include BOOST_PP_ITERATE()
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME static_cast_from
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
+#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
#include BOOST_PP_ITERATE()
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME const_cast_from
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
+#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
#include BOOST_PP_ITERATE()
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME dynamic_cast_from
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
+#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
#include BOOST_PP_ITERATE()
namespace boost {
@@ -141,6 +143,8 @@ namespace detail {
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(element_type)
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_traits_ptr)
//////////////////////
//struct first_param
@@ -149,7 +153,7 @@ BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
template <typename T> struct first_param
{ typedef void type; };
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <template <typename, typename...> class TemplateClass, typename T, typename... Args>
struct first_param< TemplateClass<T, Args...> >
@@ -173,7 +177,7 @@ template <typename T> struct first_param
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_INTRUSIVE_MAX_CONSTRUCTOR_PARAMETERS)
#include BOOST_PP_LOCAL_ITERATE()
-#endif //!defined(BOOST_NO_VARIADIC_TEMPLATES)
+#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
///////////////////////////
//struct type_rebind_mode
@@ -182,11 +186,7 @@ template <typename Ptr, typename T>
struct type_has_rebind
{
template <typename X>
- #if !defined (__SUNPRO_CC)
static char test(int, typename X::template rebind<T>*);
- #else
- static char test(int, typename X::rebind<T>*);
- #endif
template <typename X>
static int test(boost::intrusive::detail::LowPriorityConversion<int>, void*);
@@ -198,11 +198,7 @@ template <typename Ptr, typename T>
struct type_has_rebind_other
{
template <typename X>
- #if !defined (__SUNPRO_CC)
static char test(int, typename X::template rebind<T>::other*);
- #else
- static char test(int, typename X::rebind<T>::other*);
- #endif
template <typename X>
static int test(boost::intrusive::detail::LowPriorityConversion<int>, void*);
@@ -245,7 +241,7 @@ struct type_rebinder< Ptr, U, 1u >
// OtherArgs>, where OtherArgs comprises zero or more type parameters.
// Many pointers fit this form, hence many pointers will get a
// reasonable default for rebind.
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <template <class, class...> class Ptr, typename T, class... Tn, class U>
struct type_rebinder<Ptr<T, Tn...>, U, 0u >
@@ -277,7 +273,7 @@ struct type_rebinder
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_INTRUSIVE_MAX_CONSTRUCTOR_PARAMETERS)
#include BOOST_PP_LOCAL_ITERATE()
-#endif //!defined(BOOST_NO_VARIADIC_TEMPLATES)
+#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
} //namespace detail {
} //namespace intrusive {
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/mpl.hpp b/3rdParty/Boost/src/boost/intrusive/detail/mpl.hpp
index 02b1361..9dc0d52 100644
--- a/3rdParty/Boost/src/boost/intrusive/detail/mpl.hpp
+++ b/3rdParty/Boost/src/boost/intrusive/detail/mpl.hpp
@@ -1,6 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2006-2012
+// (C) Copyright Ion Gaztanaga 2006-2014
+// (C) Copyright Microsoft Corporation 2014
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -20,6 +21,59 @@ namespace boost {
namespace intrusive {
namespace detail {
+template <typename T, typename U>
+struct is_same
+{
+ static const bool value = false;
+};
+
+template <typename T>
+struct is_same<T, T>
+{
+ static const bool value = true;
+};
+
+template<typename T>
+struct add_const
+{ typedef const T type; };
+
+template<typename T>
+struct remove_const
+{ typedef T type; };
+
+template<typename T>
+struct remove_const<const T>
+{ typedef T type; };
+
+template<typename T>
+struct remove_cv
+{ typedef T type; };
+
+template<typename T>
+struct remove_cv<const T>
+{ typedef T type; };
+
+template<typename T>
+struct remove_cv<const volatile T>
+{ typedef T type; };
+
+template<typename T>
+struct remove_cv<volatile T>
+{ typedef T type; };
+
+template<class T>
+struct remove_reference
+{
+ typedef T type;
+};
+
+template<class T>
+struct remove_reference<T&>
+{
+ typedef T type;
+};
+
+
typedef char one;
struct two {one _[2];};
@@ -29,6 +83,12 @@ struct bool_
static const bool value = C_;
};
+template< class Integer, Integer Value >
+struct integer
+{
+ static const Integer value = Value;
+};
+
typedef bool_<true> true_;
typedef bool_<false> false_;
@@ -58,18 +118,32 @@ struct apply
typedef typename F::template apply<Param>::type type;
};
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
+
+template <class T, class U>
+struct is_convertible
+{
+ static const bool value = __is_convertible_to(T, U);
+};
+
+#else
+
template <class T, class U>
class is_convertible
{
typedef char true_t;
class false_t { char dummy[2]; };
- static true_t dispatch(U);
+ //use any_conversion as first parameter since in MSVC
+ //overaligned types can't go through ellipsis
static false_t dispatch(...);
- static const T &trigger();
+ static true_t dispatch(U);
+ static typename remove_reference<T>::type &trigger();
public:
static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t);
};
+#endif
+
template<
bool C
, typename T1
@@ -130,7 +204,7 @@ struct identity
#define BOOST_INTRUSIVE_TT_DECL
#endif
-#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) && !defined(UNDER_CE)
+#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) && !defined(_M_ARM) && !defined(UNDER_CE)
#define BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
#endif
@@ -280,49 +354,6 @@ struct alignment_of
>::value;
};
-template <typename T, typename U>
-struct is_same
-{
- typedef char yes_type;
- struct no_type
- {
- char padding[8];
- };
-
- template <typename V>
- static yes_type is_same_tester(V*, V*);
- static no_type is_same_tester(...);
-
- static T *t;
- static U *u;
-
- static const bool value = sizeof(yes_type) == sizeof(is_same_tester(t,u));
-};
-
-template<typename T>
-struct add_const
-{ typedef const T type; };
-
-template<typename T>
-struct remove_const
-{ typedef T type; };
-
-template<typename T>
-struct remove_const<const T>
-{ typedef T type; };
-
-template<class T>
-struct remove_reference
-{
- typedef T type;
-};
-
-template<class T>
-struct remove_reference<T&>
-{
- typedef T type;
-};
-
template<class Class>
class is_empty_class
{
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/parent_from_member.hpp b/3rdParty/Boost/src/boost/intrusive/detail/parent_from_member.hpp
new file mode 100644
index 0000000..cf9f379
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/parent_from_member.hpp
@@ -0,0 +1,117 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2013
+//
+// 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_PARENT_FROM_MEMBER_HPP
+#define BOOST_INTRUSIVE_DETAIL_PARENT_FROM_MEMBER_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <cstddef>
+
+#if defined(BOOST_MSVC) || ((defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && defined(BOOST_INTEL))
+ #define BOOST_INTRUSIVE_MSVC_ABI_PTR_TO_MEMBER
+ #include <boost/cstdint.hpp>
+ #include <boost/static_assert.hpp>
+#endif
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+template<class Parent, class Member>
+inline std::ptrdiff_t offset_from_pointer_to_member(const Member Parent::* ptr_to_member)
+{
+ //The implementation of a pointer to member is compiler dependent.
+ #if defined(BOOST_INTRUSIVE_MSVC_ABI_PTR_TO_MEMBER)
+
+ //MSVC compliant compilers use their the first 32 bits as offset (even in 64 bit mode)
+ union caster_union
+ {
+ const Member Parent::* ptr_to_member;
+ boost::int32_t offset;
+ } caster;
+
+ //MSVC ABI can use up to 3 int32 to represent pointer to member data
+ //with virtual base classes, in those cases there is no simple to
+ //obtain the address of the parent. So static assert to avoid runtime errors
+ BOOST_STATIC_ASSERT( sizeof(caster) == sizeof(boost::int32_t) );
+
+ caster.ptr_to_member = ptr_to_member;
+ return std::ptrdiff_t(caster.offset);
+ //Additional info on MSVC behaviour for the future. For 2/3 int ptr-to-member
+ //types dereference seems to be:
+ //
+ // vboffset = [compile_time_offset if 2-int ptr2memb] /
+ // [ptr2memb.i32[2] if 3-int ptr2memb].
+ // vbtable = *(this + vboffset);
+ // adj = vbtable[ptr2memb.i32[1]];
+ // var = adj + (this + vboffset) + ptr2memb.i32[0];
+ //
+ //To reverse the operation we need to
+ // - obtain vboffset (in 2-int ptr2memb implementation only)
+ // - Go to Parent's vbtable and obtain adjustment at index ptr2memb.i32[1]
+ // - parent = member - adj - vboffset - ptr2memb.i32[0]
+ //
+ //Even accessing to RTTI we might not be able to obtain this information
+ //so anyone who thinks it's possible, please send a patch.
+
+ //This works with gcc, msvc, ac++, ibmcpp
+ #elif defined(__GNUC__) || defined(__HP_aCC) || defined(BOOST_INTEL) || \
+ defined(__IBMCPP__) || defined(__DECCXX)
+ const Parent * const parent = 0;
+ const char *const member = static_cast<const char*>(static_cast<const void*>(&(parent->*ptr_to_member)));
+ return std::ptrdiff_t(member - static_cast<const char*>(static_cast<const void*>(parent)));
+ #else
+ //This is the traditional C-front approach: __MWERKS__, __DMC__, __SUNPRO_CC
+ union caster_union
+ {
+ const Member Parent::* ptr_to_member;
+ std::ptrdiff_t offset;
+ } caster;
+ caster.ptr_to_member = ptr_to_member;
+ return caster.offset - 1;
+ #endif
+}
+
+template<class Parent, class Member>
+inline Parent *parent_from_member(Member *member, const Member Parent::* ptr_to_member)
+{
+ return static_cast<Parent*>
+ (
+ static_cast<void*>
+ (
+ static_cast<char*>(static_cast<void*>(member)) - offset_from_pointer_to_member(ptr_to_member)
+ )
+ );
+}
+
+template<class Parent, class Member>
+inline const Parent *parent_from_member(const Member *member, const Member Parent::* ptr_to_member)
+{
+ return static_cast<const Parent*>
+ (
+ static_cast<const void*>
+ (
+ static_cast<const char*>(static_cast<const void*>(member)) - offset_from_pointer_to_member(ptr_to_member)
+ )
+ );
+}
+
+} //namespace detail {
+} //namespace intrusive {
+} //namespace boost {
+
+#ifdef BOOST_INTRUSIVE_MSVC_ABI_PTR_TO_MEMBER
+#undef BOOST_INTRUSIVE_MSVC_ABI_PTR_TO_MEMBER
+#endif
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_INTRUSIVE_DETAIL_PARENT_FROM_MEMBER_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/preprocessor.hpp b/3rdParty/Boost/src/boost/intrusive/detail/preprocessor.hpp
index 348b104..b8143a4 100644
--- a/3rdParty/Boost/src/boost/intrusive/detail/preprocessor.hpp
+++ b/3rdParty/Boost/src/boost/intrusive/detail/preprocessor.hpp
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2008-2012. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2013. 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)
//
@@ -11,7 +11,7 @@
#ifndef BOOST_INTRUSIVE_DETAIL_PREPROCESSOR_HPP
#define BOOST_INTRUSIVE_DETAIL_PREPROCESSOR_HPP
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/slist_node.hpp b/3rdParty/Boost/src/boost/intrusive/detail/slist_node.hpp
new file mode 100644
index 0000000..9f57d67
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/slist_node.hpp
@@ -0,0 +1,145 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// 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_SLIST_NODE_HPP
+#define BOOST_INTRUSIVE_SLIST_NODE_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/utilities.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+
+namespace boost {
+namespace intrusive {
+
+template<class VoidPointer>
+struct slist_node
+{
+ typedef typename pointer_traits
+ <VoidPointer>::template rebind_pointer<slist_node>::type node_ptr;
+ node_ptr next_;
+};
+
+// slist_node_traits can be used with circular_slist_algorithms and supplies
+// a slist_node holding the pointers needed for a singly-linked list
+// it is used by slist_base_hook and slist_member_hook
+template<class VoidPointer>
+struct slist_node_traits
+{
+ typedef slist_node<VoidPointer> node;
+ typedef typename pointer_traits
+ <VoidPointer>::template rebind_pointer<node>::type node_ptr;
+ typedef typename pointer_traits
+ <VoidPointer>::template rebind_pointer<const node>::type const_node_ptr;
+
+ static node_ptr get_next(const const_node_ptr & n)
+ { return n->next_; }
+
+ static node_ptr get_next(const node_ptr & n)
+ { return n->next_; }
+
+ static void set_next(const node_ptr & n, const node_ptr & next)
+ { n->next_ = next; }
+};
+
+// slist_iterator provides some basic functions for a
+// node oriented bidirectional iterator:
+template<class ValueTraits, bool IsConst>
+class slist_iterator
+{
+ protected:
+ typedef iiterator
+ <ValueTraits, IsConst, std::forward_iterator_tag> types_t;
+
+ static const bool stateful_value_traits = types_t::stateful_value_traits;
+
+ typedef ValueTraits value_traits;
+ typedef typename types_t::node_traits node_traits;
+
+ 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;
+
+ public:
+ typedef typename types_t::iterator_traits::difference_type difference_type;
+ typedef typename types_t::iterator_traits::value_type value_type;
+ typedef typename types_t::iterator_traits::pointer pointer;
+ typedef typename types_t::iterator_traits::reference reference;
+ typedef typename types_t::iterator_traits::iterator_category iterator_category;
+
+ slist_iterator()
+ {}
+
+ explicit slist_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
+ : members_(nodeptr, traits_ptr)
+ {}
+
+ slist_iterator(slist_iterator<ValueTraits, false> const& other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ const node_ptr &pointed_node() const
+ { return members_.nodeptr_; }
+
+ slist_iterator &operator=(const node_ptr &node)
+ { members_.nodeptr_ = node; return static_cast<slist_iterator&>(*this); }
+
+ const_value_traits_ptr get_value_traits() const
+ { return members_.get_ptr(); }
+
+ public:
+ slist_iterator& operator++()
+ {
+ members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
+ return static_cast<slist_iterator&> (*this);
+ }
+
+ slist_iterator operator++(int)
+ {
+ slist_iterator result (*this);
+ members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
+ return result;
+ }
+
+ friend bool operator== (const slist_iterator& l, const slist_iterator& r)
+ { return l.pointed_node() == r.pointed_node(); }
+
+ friend bool operator!= (const slist_iterator& l, const slist_iterator& r)
+ { return !(l == r); }
+
+ reference operator*() const
+ { return *operator->(); }
+
+ pointer operator->() const
+ { return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
+
+ slist_iterator<ValueTraits, false> unconst() const
+ { return slist_iterator<ValueTraits, false>(this->pointed_node(), this->get_value_traits()); }
+
+ private:
+
+ pointer operator_arrow(detail::false_) const
+ { return ValueTraits::to_value_ptr(members_.nodeptr_); }
+
+ pointer operator_arrow(detail::true_) const
+ { return this->get_value_traits()->to_value_ptr(members_.nodeptr_); }
+
+ iiterator_members<node_ptr, const_value_traits_ptr, stateful_value_traits> members_;
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SLIST_NODE_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/utilities.hpp b/3rdParty/Boost/src/boost/intrusive/detail/utilities.hpp
new file mode 100644
index 0000000..b893d22
--- /dev/null
+++ b/3rdParty/Boost/src/boost/intrusive/detail/utilities.hpp
@@ -0,0 +1,1279 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// 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_UTILITIES_HPP
+#define BOOST_INTRUSIVE_DETAIL_UTILITIES_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/parent_from_member.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
+#include <boost/intrusive/detail/memory_util.hpp>
+#include <boost/cstdint.hpp>
+#include <cstddef>
+#include <climits>
+#include <iterator>
+#include <boost/cstdint.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <functional>
+#include <boost/functional/hash.hpp>
+#include <boost/tti/tti.hpp>
+
+namespace boost {
+namespace intrusive {
+
+enum algo_types
+{
+ CircularListAlgorithms,
+ CircularSListAlgorithms,
+ LinearSListAlgorithms,
+ BsTreeAlgorithms,
+ RbTreeAlgorithms,
+ AvlTreeAlgorithms,
+ SgTreeAlgorithms,
+ SplayTreeAlgorithms,
+ TreapAlgorithms
+};
+
+template<algo_types AlgoType, class NodeTraits>
+struct get_algo;
+
+template <link_mode_type link_mode>
+struct is_safe_autounlink
+{
+ static const bool value =
+ (int)link_mode == (int)auto_unlink ||
+ (int)link_mode == (int)safe_link;
+};
+
+namespace detail {
+
+template <class T>
+struct internal_member_value_traits
+{
+ template <class U> static detail::one test(...);
+ template <class U> static detail::two test(typename U::member_value_traits* = 0);
+ static const bool value = sizeof(test<T>(0)) == sizeof(detail::two);
+};
+
+#define BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(TRAITS_PREFIX, TYPEDEF_TO_FIND) \
+template <class T>\
+struct TRAITS_PREFIX##_bool\
+{\
+ template<bool Add>\
+ struct two_or_three {one _[2 + Add];};\
+ template <class U> static one test(...);\
+ template <class U> static two_or_three<U::TYPEDEF_TO_FIND> test (int);\
+ static const std::size_t value = sizeof(test<T>(0));\
+};\
+\
+template <class T>\
+struct TRAITS_PREFIX##_bool_is_true\
+{\
+ static const bool value = TRAITS_PREFIX##_bool<T>::value > sizeof(one)*2;\
+};\
+//
+
+BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(internal_base_hook, hooktags::is_base_hook)
+BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(internal_any_hook, is_any_hook)
+BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(resizable, resizable)
+
+template <class T>
+inline T* to_raw_pointer(T* p)
+{ return p; }
+
+template <class Pointer>
+inline typename boost::intrusive::pointer_traits<Pointer>::element_type*
+to_raw_pointer(const Pointer &p)
+{ return boost::intrusive::detail::to_raw_pointer(p.operator->()); }
+
+//This functor compares a stored value
+//and the one passed as an argument
+template<class ConstReference>
+class equal_to_value
+{
+ ConstReference t_;
+
+ public:
+ equal_to_value(ConstReference t)
+ : t_(t)
+ {}
+
+ bool operator()(ConstReference t)const
+ { return t_ == t; }
+};
+
+class null_disposer
+{
+ public:
+ template <class Pointer>
+ void operator()(Pointer)
+ {}
+};
+
+template<class NodeAlgorithms>
+class init_disposer
+{
+ typedef typename NodeAlgorithms::node_ptr node_ptr;
+
+ public:
+ void operator()(const node_ptr & p)
+ { NodeAlgorithms::init(p); }
+};
+
+template<bool ConstantSize, class SizeType, class Tag = void>
+struct size_holder
+{
+ static const bool constant_time_size = ConstantSize;
+ typedef SizeType size_type;
+
+ SizeType get_size() const
+ { return size_; }
+
+ void set_size(SizeType size)
+ { size_ = size; }
+
+ void decrement()
+ { --size_; }
+
+ void increment()
+ { ++size_; }
+
+ void increase(SizeType n)
+ { size_ += n; }
+
+ void decrease(SizeType n)
+ { size_ -= n; }
+
+ SizeType size_;
+};
+
+template<class SizeType, class Tag>
+struct size_holder<false, SizeType, Tag>
+{
+ static const bool constant_time_size = false;
+ typedef SizeType size_type;
+
+ size_type get_size() const
+ { return 0; }
+
+ void set_size(size_type)
+ {}
+
+ void decrement()
+ {}
+
+ void increment()
+ {}
+
+ void increase(SizeType)
+ {}
+
+ void decrease(SizeType)
+ {}
+};
+
+template<class KeyValueCompare, class ValueTraits>
+struct key_nodeptr_comp
+ : private detail::ebo_functor_holder<KeyValueCompare>
+{
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::node_ptr node_ptr;
+ typedef typename value_traits::const_node_ptr const_node_ptr;
+ typedef detail::ebo_functor_holder<KeyValueCompare> base_t;
+ key_nodeptr_comp(KeyValueCompare kcomp, const ValueTraits *traits)
+ : base_t(kcomp), traits_(traits)
+ {}
+
+ template<class T>
+ struct is_node_ptr
+ {
+ static const bool value = is_same<T, const_node_ptr>::value || is_same<T, node_ptr>::value;
+ };
+
+ template<class T>
+ const value_type & key_forward
+ (const T &node, typename enable_if_c<is_node_ptr<T>::value>::type * = 0) const
+ { return *traits_->to_value_ptr(node); }
+
+ template<class T>
+ const T & key_forward(const T &key, typename enable_if_c<!is_node_ptr<T>::value>::type* = 0) const
+ { return key; }
+
+
+ template<class KeyType, class KeyType2>
+ bool operator()(const KeyType &key1, const KeyType2 &key2) const
+ { return base_t::get()(this->key_forward(key1), this->key_forward(key2)); }
+
+ const ValueTraits *const traits_;
+};
+
+template<class F, class ValueTraits, algo_types AlgoType>
+struct node_cloner
+ : private detail::ebo_functor_holder<F>
+{
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef detail::ebo_functor_holder<F> base_t;
+ typedef typename get_algo< AlgoType
+ , node_traits>::type node_algorithms;
+ static const bool safemode_or_autounlink =
+ is_safe_autounlink<value_traits::link_mode>::value;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::pointer pointer;
+ typedef typename node_traits::node node;
+ typedef typename value_traits::const_node_ptr const_node_ptr;
+ typedef typename value_traits::reference reference;
+ typedef typename value_traits::const_reference const_reference;
+
+ node_cloner(F f, const ValueTraits *traits)
+ : base_t(f), traits_(traits)
+ {}
+
+ // tree-based containers use this method, which is proxy-reference friendly
+ node_ptr operator()(const node_ptr & p)
+ {
+ const_reference v = *traits_->to_value_ptr(p);
+ node_ptr n = traits_->to_node_ptr(*base_t::get()(v));
+ //Cloned node must be in default mode if the linking mode requires it
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(n));
+ return n;
+ }
+
+ // hashtables use this method, which is proxy-reference unfriendly
+ node_ptr operator()(const node &to_clone)
+ {
+ const value_type &v =
+ *traits_->to_value_ptr
+ (pointer_traits<const_node_ptr>::pointer_to(to_clone));
+ node_ptr n = traits_->to_node_ptr(*base_t::get()(v));
+ //Cloned node must be in default mode if the linking mode requires it
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(n));
+ return n;
+ }
+
+ const ValueTraits * const traits_;
+};
+
+template<class F, class ValueTraits, algo_types AlgoType>
+struct node_disposer
+ : private detail::ebo_functor_holder<F>
+{
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef detail::ebo_functor_holder<F> base_t;
+ typedef typename get_algo< AlgoType
+ , node_traits>::type node_algorithms;
+ static const bool safemode_or_autounlink =
+ is_safe_autounlink<value_traits::link_mode>::value;
+
+ node_disposer(F f, const ValueTraits *cont)
+ : base_t(f), traits_(cont)
+ {}
+
+ void operator()(const node_ptr & p)
+ {
+ if(safemode_or_autounlink)
+ node_algorithms::init(p);
+ base_t::get()(traits_->to_value_ptr(p));
+ }
+ const ValueTraits * const traits_;
+};
+
+template<class VoidPointer>
+struct dummy_constptr
+{
+ typedef typename boost::intrusive::pointer_traits<VoidPointer>::
+ template rebind_pointer<const void>::type ConstVoidPtr;
+
+ explicit dummy_constptr(ConstVoidPtr)
+ {}
+
+ dummy_constptr()
+ {}
+
+ ConstVoidPtr get_ptr() const
+ { return ConstVoidPtr(); }
+};
+
+template<class VoidPointer>
+struct constptr
+{
+ typedef typename boost::intrusive::pointer_traits<VoidPointer>::
+ template rebind_pointer<const void>::type ConstVoidPtr;
+
+ constptr()
+ {}
+
+ explicit constptr(const ConstVoidPtr &ptr)
+ : const_void_ptr_(ptr)
+ {}
+
+ const void *get_ptr() const
+ { return boost::intrusive::detail::to_raw_pointer(const_void_ptr_); }
+
+ ConstVoidPtr const_void_ptr_;
+};
+
+template <class VoidPointer, bool store_ptr>
+struct select_constptr
+{
+ typedef typename detail::if_c
+ < store_ptr
+ , constptr<VoidPointer>
+ , dummy_constptr<VoidPointer>
+ >::type type;
+};
+
+template<class T, bool Add>
+struct add_const_if_c
+{
+ typedef typename detail::if_c
+ < Add
+ , typename detail::add_const<T>::type
+ , T
+ >::type type;
+};
+
+template <link_mode_type LinkMode>
+struct link_dispatch
+{};
+
+template<class Hook>
+void destructor_impl(Hook &hook, detail::link_dispatch<safe_link>)
+{ //If this assertion raises, you might have destroyed an object
+ //while it was still inserted in a container that is alive.
+ //If so, remove the object from the container before destroying it.
+ (void)hook; BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT(!hook.is_linked());
+}
+
+template<class Hook>
+void destructor_impl(Hook &hook, detail::link_dispatch<auto_unlink>)
+{ hook.unlink(); }
+
+template<class Hook>
+void destructor_impl(Hook &, detail::link_dispatch<normal_link>)
+{}
+
+///////////////////////////
+// floor_log2 Dispatcher
+////////////////////////////
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1300)
+
+ }}} //namespace boost::intrusive::detail
+
+ //Use _BitScanReverseXX intrinsics
+
+ #if defined(_M_X64) || defined(_M_AMD64) || defined(_M_IA64) //64 bit target
+ #define BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
+ #endif
+
+ #ifndef __INTRIN_H_ // Avoid including any windows system header
+ #ifdef __cplusplus
+ extern "C" {
+ #endif // __cplusplus
+
+ #if defined(BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT) //64 bit target
+ unsigned char _BitScanReverse64(unsigned long *index, unsigned __int64 mask);
+ #pragma intrinsic(_BitScanReverse64)
+ #else //32 bit target
+ unsigned char _BitScanReverse(unsigned long *index, unsigned long mask);
+ #pragma intrinsic(_BitScanReverse)
+ #endif
+
+ #ifdef __cplusplus
+ }
+ #endif // __cplusplus
+ #endif // __INTRIN_H_
+
+ #ifdef BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
+ #define BOOST_INTRUSIVE_BSR_INTRINSIC _BitScanReverse64
+ #undef BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
+ #else
+ #define BOOST_INTRUSIVE_BSR_INTRINSIC _BitScanReverse
+ #endif
+
+ namespace boost {
+ namespace intrusive {
+ namespace detail {
+
+ inline std::size_t floor_log2 (std::size_t x)
+ {
+ unsigned long log2;
+ BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, (unsigned long)x );
+ return log2;
+ }
+
+ #undef BOOST_INTRUSIVE_BSR_INTRINSIC
+
+#elif defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) //GCC >=3.4
+
+ //Compile-time error in case of missing specialization
+ template<class Uint>
+ struct builtin_clz_dispatch;
+
+ #if defined(BOOST_HAS_LONG_LONG)
+ template<>
+ struct builtin_clz_dispatch<unsigned long long>
+ {
+ static unsigned long long call(unsigned long long n)
+ { return __builtin_clzll(n); }
+ };
+ #endif
+
+ template<>
+ struct builtin_clz_dispatch<unsigned long>
+ {
+ static unsigned long call(unsigned long n)
+ { return __builtin_clzl(n); }
+ };
+
+ template<>
+ struct builtin_clz_dispatch<unsigned int>
+ {
+ static unsigned int call(unsigned int n)
+ { return __builtin_clz(n); }
+ };
+
+ inline std::size_t floor_log2(std::size_t n)
+ {
+ return sizeof(std::size_t)*CHAR_BIT - std::size_t(1) - builtin_clz_dispatch<std::size_t>::call(n);
+ }
+
+#else //Portable methods
+
+////////////////////////////
+// Generic method
+////////////////////////////
+
+ inline std::size_t floor_log2_get_shift(std::size_t n, true_ )//power of two size_t
+ { return n >> 1; }
+
+ inline std::size_t floor_log2_get_shift(std::size_t n, false_ )//non-power of two size_t
+ { return (n >> 1) + ((n & 1u) & (n != 1)); }
+
+ template<std::size_t N>
+ inline std::size_t floor_log2 (std::size_t x, integer<std::size_t, N>)
+ {
+ const std::size_t Bits = N;
+ const bool Size_t_Bits_Power_2= !(Bits & (Bits-1));
+
+ std::size_t n = x;
+ std::size_t log2 = 0;
+
+ std::size_t remaining_bits = Bits;
+ std::size_t shift = floor_log2_get_shift(remaining_bits, bool_<Size_t_Bits_Power_2>());
+ while(shift){
+ std::size_t tmp = n >> shift;
+ if (tmp){
+ log2 += shift, n = tmp;
+ }
+ shift = floor_log2_get_shift(shift, bool_<Size_t_Bits_Power_2>());
+ }
+
+ return log2;
+ }
+
+ ////////////////////////////
+ // DeBruijn method
+ ////////////////////////////
+
+ //Taken from:
+ //http://stackoverflow.com/questions/11376288/fast-computing-of-log2-for-64-bit-integers
+ //Thanks to Desmond Hume
+
+ inline std::size_t floor_log2 (std::size_t v, integer<std::size_t, 32>)
+ {
+ static const int MultiplyDeBruijnBitPosition[32] =
+ {
+ 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
+ 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31
+ };
+
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+
+ return MultiplyDeBruijnBitPosition[(std::size_t)(v * 0x07C4ACDDU) >> 27];
+ }
+
+ inline std::size_t floor_log2 (std::size_t v, integer<std::size_t, 64>)
+ {
+ static const std::size_t MultiplyDeBruijnBitPosition[64] = {
+ 63, 0, 58, 1, 59, 47, 53, 2,
+ 60, 39, 48, 27, 54, 33, 42, 3,
+ 61, 51, 37, 40, 49, 18, 28, 20,
+ 55, 30, 34, 11, 43, 14, 22, 4,
+ 62, 57, 46, 52, 38, 26, 32, 41,
+ 50, 36, 17, 19, 29, 10, 13, 21,
+ 56, 45, 25, 31, 35, 16, 9, 12,
+ 44, 24, 15, 8, 23, 7, 6, 5};
+
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ v |= v >> 32;
+ return MultiplyDeBruijnBitPosition[((std::size_t)((v - (v >> 1))*0x07EDD5E59A4E28C2ULL)) >> 58];
+ }
+
+
+ inline std::size_t floor_log2 (std::size_t x)
+ {
+ const std::size_t Bits = sizeof(std::size_t)*CHAR_BIT;
+ return floor_log2(x, integer<std::size_t, Bits>());
+ }
+
+#endif
+
+//Thanks to Laurent de Soras in
+//http://www.flipcode.com/archives/Fast_log_Function.shtml
+inline float fast_log2 (float val)
+{
+ union caster_t
+ {
+ boost::uint32_t x;
+ float val;
+ } caster;
+
+ caster.val = val;
+ boost::uint32_t x = caster.x;
+ const int log_2 = int((x >> 23) & 255) - 128;
+ x &= ~(boost::uint32_t(255u) << 23u);
+ x += boost::uint32_t(127) << 23u;
+ caster.x = x;
+ val = caster.val;
+ //1+log2(m), m ranging from 1 to 2
+ //3rd degree polynomial keeping first derivate continuity.
+ //For less precision the line can be commented out
+ val = ((-1.f/3.f) * val + 2.f) * val - (2.f/3.f);
+ return (val + log_2);
+}
+
+inline std::size_t ceil_log2 (std::size_t x)
+{
+ return static_cast<std::size_t>((x & (x-1)) != 0) + floor_log2(x);
+}
+
+template<class SizeType, std::size_t N>
+struct numbits_eq
+{
+ static const bool value = sizeof(SizeType)*CHAR_BIT == N;
+};
+
+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>
+{
+ static const boost::uint32_t value = 0xb504f334;
+ static const std::size_t pow = 31;
+};
+
+#ifndef BOOST_NO_INT64_T
+
+template <class SizeType>
+struct sqrt2_pow_max<SizeType, typename enable_if< numbits_eq<SizeType, 64> >::type>
+{
+ static const boost::uint64_t value = 0xb504f333f9de6484ull;
+ static const std::size_t pow = 63;
+};
+
+#endif //BOOST_NO_INT64_T
+
+// Returns floor(pow(sqrt(2), x * 2 + 1)).
+// Defined for X from 0 up to the number of bits in size_t minus 1.
+inline std::size_t sqrt2_pow_2xplus1 (std::size_t x)
+{
+ const std::size_t value = (std::size_t)sqrt2_pow_max<std::size_t>::value;
+ const std::size_t pow = (std::size_t)sqrt2_pow_max<std::size_t>::pow;
+ return (value >> (pow - x)) + 1;
+}
+
+template<class Container, class Disposer>
+class exception_disposer
+{
+ Container *cont_;
+ Disposer &disp_;
+
+ exception_disposer(const exception_disposer&);
+ exception_disposer &operator=(const exception_disposer&);
+
+ public:
+ exception_disposer(Container &cont, Disposer &disp)
+ : cont_(&cont), disp_(disp)
+ {}
+
+ void release()
+ { cont_ = 0; }
+
+ ~exception_disposer()
+ {
+ if(cont_){
+ cont_->clear_and_dispose(disp_);
+ }
+ }
+};
+
+template<class Container, class Disposer, class SizeType>
+class exception_array_disposer
+{
+ Container *cont_;
+ Disposer &disp_;
+ SizeType &constructed_;
+
+ exception_array_disposer(const exception_array_disposer&);
+ exception_array_disposer &operator=(const exception_array_disposer&);
+
+ public:
+
+ exception_array_disposer
+ (Container &cont, Disposer &disp, SizeType &constructed)
+ : cont_(&cont), disp_(disp), constructed_(constructed)
+ {}
+
+ void release()
+ { cont_ = 0; }
+
+ ~exception_array_disposer()
+ {
+ SizeType n = constructed_;
+ if(cont_){
+ while(n--){
+ cont_[n].clear_and_dispose(disp_);
+ }
+ }
+ }
+};
+
+template<class ValueTraits, bool IsConst>
+struct node_to_value
+ : public detail::select_constptr
+ < typename pointer_traits
+ <typename ValueTraits::pointer>::template rebind_pointer<void>::type
+ , is_stateful_value_traits<ValueTraits>::value
+ >::type
+{
+ static const bool stateful_value_traits = is_stateful_value_traits<ValueTraits>::value;
+ typedef typename detail::select_constptr
+ < typename pointer_traits
+ <typename ValueTraits::pointer>::
+ template rebind_pointer<void>::type
+ , stateful_value_traits >::type Base;
+
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::node_traits::node node;
+ typedef typename detail::add_const_if_c
+ <value_type, IsConst>::type vtype;
+ typedef typename detail::add_const_if_c
+ <node, IsConst>::type ntype;
+ typedef typename pointer_traits
+ <typename ValueTraits::pointer>::
+ template rebind_pointer<ntype>::type npointer;
+ typedef typename pointer_traits<npointer>::
+ template rebind_pointer<const ValueTraits>::type const_value_traits_ptr;
+
+ node_to_value(const const_value_traits_ptr &ptr)
+ : Base(ptr)
+ {}
+
+ typedef vtype & result_type;
+ typedef ntype & first_argument_type;
+
+ const_value_traits_ptr get_value_traits() const
+ { return pointer_traits<const_value_traits_ptr>::static_cast_from(Base::get_ptr()); }
+
+ result_type to_value(first_argument_type arg, false_) const
+ { return *(value_traits::to_value_ptr(pointer_traits<npointer>::pointer_to(arg))); }
+
+ result_type to_value(first_argument_type arg, true_) const
+ { return *(this->get_value_traits()->to_value_ptr(pointer_traits<npointer>::pointer_to(arg))); }
+
+ result_type operator()(first_argument_type arg) const
+ { return this->to_value(arg, bool_<stateful_value_traits>()); }
+};
+
+//This is not standard, but should work with all compilers
+union max_align
+{
+ char char_;
+ short short_;
+ int int_;
+ long long_;
+ #ifdef BOOST_HAS_LONG_LONG
+ long long long_long_;
+ #endif
+ float float_;
+ double double_;
+ long double long_double_;
+ void * void_ptr_;
+};
+
+template<class T, std::size_t N>
+class array_initializer
+{
+ public:
+ template<class CommonInitializer>
+ array_initializer(const CommonInitializer &init)
+ {
+ char *init_buf = (char*)rawbuf;
+ std::size_t i = 0;
+ BOOST_TRY{
+ for(; i != N; ++i){
+ new(init_buf)T(init);
+ init_buf += sizeof(T);
+ }
+ }
+ BOOST_CATCH(...){
+ while(i--){
+ init_buf -= sizeof(T);
+ ((T*)init_buf)->~T();
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ operator T* ()
+ { return (T*)(rawbuf); }
+
+ operator const T*() const
+ { return (const T*)(rawbuf); }
+
+ ~array_initializer()
+ {
+ char *init_buf = (char*)rawbuf + N*sizeof(T);
+ for(std::size_t i = 0; i != N; ++i){
+ init_buf -= sizeof(T);
+ ((T*)init_buf)->~T();
+ }
+ }
+
+ private:
+ detail::max_align rawbuf[(N*sizeof(T)-1)/sizeof(detail::max_align)+1];
+};
+
+
+
+
+template<class It>
+class reverse_iterator
+ : public std::iterator<
+ typename std::iterator_traits<It>::iterator_category,
+ typename std::iterator_traits<It>::value_type,
+ typename std::iterator_traits<It>::difference_type,
+ typename std::iterator_traits<It>::pointer,
+ typename std::iterator_traits<It>::reference>
+{
+ public:
+ typedef typename std::iterator_traits<It>::pointer pointer;
+ typedef typename std::iterator_traits<It>::reference reference;
+ typedef typename std::iterator_traits<It>::difference_type difference_type;
+ typedef It iterator_type;
+
+ reverse_iterator(){}
+
+ explicit reverse_iterator(It r)
+ : m_current(r)
+ {}
+
+ template<class OtherIt>
+ reverse_iterator(const reverse_iterator<OtherIt>& r)
+ : m_current(r.base())
+ {}
+
+ It base() const
+ { return m_current; }
+
+ reference operator*() const
+ { It temp(m_current); --temp; return *temp; }
+
+ pointer operator->() const
+ { It temp(m_current); --temp; return temp.operator->(); }
+
+ reference operator[](difference_type off) const
+ { return this->m_current[-off]; }
+
+ reverse_iterator& operator++()
+ { --m_current; return *this; }
+
+ reverse_iterator operator++(int)
+ {
+ reverse_iterator temp = *this;
+ --m_current;
+ return temp;
+ }
+
+ reverse_iterator& operator--()
+ {
+ ++m_current;
+ return *this;
+ }
+
+ reverse_iterator operator--(int)
+ {
+ reverse_iterator temp(*this);
+ ++m_current;
+ return temp;
+ }
+
+ friend bool operator==(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current == r.m_current; }
+
+ friend bool operator!=(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current != r.m_current; }
+
+ friend bool operator<(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current < r.m_current; }
+
+ friend bool operator<=(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current <= r.m_current; }
+
+ friend bool operator>(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current > r.m_current; }
+
+ friend bool operator>=(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current >= r.m_current; }
+
+ reverse_iterator& operator+=(difference_type off)
+ { m_current -= off; return *this; }
+
+ friend reverse_iterator operator+(const reverse_iterator & l, difference_type off)
+ {
+ reverse_iterator tmp(l.m_current);
+ tmp.m_current -= off;
+ return tmp;
+ }
+
+ reverse_iterator& operator-=(difference_type off)
+ { m_current += off; return *this; }
+
+ friend reverse_iterator operator-(const reverse_iterator & l, difference_type off)
+ {
+ reverse_iterator tmp(l.m_current);
+ tmp.m_current += off;
+ return tmp;
+ }
+
+ friend difference_type operator-(const reverse_iterator& l, const reverse_iterator& r)
+ { return r.m_current - l.m_current; }
+
+ private:
+ It m_current; // the wrapped iterator
+};
+
+template<class ConstNodePtr>
+struct uncast_types
+{
+ typedef typename pointer_traits<ConstNodePtr>::element_type element_type;
+ typedef typename remove_const<element_type>::type non_const_type;
+ typedef typename pointer_traits<ConstNodePtr>::
+ template rebind_pointer<non_const_type>::type non_const_pointer;
+ typedef pointer_traits<non_const_pointer> non_const_traits;
+};
+
+template<class ConstNodePtr>
+static typename uncast_types<ConstNodePtr>::non_const_pointer
+ uncast(const ConstNodePtr & ptr)
+{
+ return uncast_types<ConstNodePtr>::non_const_traits::const_cast_from(ptr);
+}
+
+// trivial header node holder
+template < typename NodeTraits >
+struct default_header_holder : public NodeTraits::node
+{
+ typedef NodeTraits node_traits;
+ typedef typename node_traits::node node;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+
+ default_header_holder() : node() {}
+
+ const_node_ptr get_node() const
+ { return pointer_traits< const_node_ptr >::pointer_to(*static_cast< const node* >(this)); }
+
+ node_ptr get_node()
+ { return pointer_traits< node_ptr >::pointer_to(*static_cast< node* >(this)); }
+
+ // (unsafe) downcast used to implement container-from-iterator
+ static default_header_holder* get_holder(const node_ptr &p)
+ { return static_cast< default_header_holder* >(boost::intrusive::detail::to_raw_pointer(p)); }
+};
+
+// type function producing the header node holder
+template < typename Value_Traits, typename HeaderHolder >
+struct get_header_holder_type
+{
+ typedef HeaderHolder type;
+};
+template < typename Value_Traits >
+struct get_header_holder_type< Value_Traits, void >
+{
+ typedef default_header_holder< typename Value_Traits::node_traits > type;
+};
+
+} //namespace detail
+
+template<class Node, class Tag, unsigned int>
+struct node_holder
+ : public Node
+{};
+
+template<class T, class NodePtr, class Tag, unsigned int Type>
+struct bhtraits_base
+{
+ public:
+ typedef NodePtr node_ptr;
+ typedef typename pointer_traits<node_ptr>::element_type node;
+ typedef node_holder<node, Tag, Type> node_holder_type;
+ typedef T value_type;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const node>::type const_node_ptr;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<T>::type pointer;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const T>::type const_pointer;
+ //typedef typename pointer_traits<pointer>::reference reference;
+ //typedef typename pointer_traits<const_pointer>::reference const_reference;
+ typedef T & reference;
+ typedef const T & const_reference;
+ typedef node_holder_type & node_holder_reference;
+ typedef const node_holder_type & const_node_holder_reference;
+ typedef node& node_reference;
+ typedef const node & const_node_reference;
+
+ static pointer to_value_ptr(const node_ptr & n)
+ {
+ return pointer_traits<pointer>::pointer_to
+ (static_cast<reference>(static_cast<node_holder_reference>(*n)));
+ }
+
+ static const_pointer to_value_ptr(const const_node_ptr & n)
+ {
+ return pointer_traits<const_pointer>::pointer_to
+ (static_cast<const_reference>(static_cast<const_node_holder_reference>(*n)));
+ }
+
+ static node_ptr to_node_ptr(reference value)
+ {
+ return pointer_traits<node_ptr>::pointer_to
+ (static_cast<node_reference>(static_cast<node_holder_reference>(value)));
+ }
+
+ static const_node_ptr to_node_ptr(const_reference value)
+ {
+ return pointer_traits<const_node_ptr>::pointer_to
+ (static_cast<const_node_reference>(static_cast<const_node_holder_reference>(value)));
+ }
+};
+
+template<class T, class NodeTraits, link_mode_type LinkMode, class Tag, unsigned int Type>
+struct bhtraits
+ : public bhtraits_base<T, typename NodeTraits::node_ptr, Tag, Type>
+{
+ static const link_mode_type link_mode = LinkMode;
+ typedef NodeTraits node_traits;
+};
+
+/*
+template<class T, class NodePtr, typename pointer_traits<NodePtr>::element_type T::* P>
+struct mhtraits_base
+{
+ public:
+ typedef typename pointer_traits<NodePtr>::element_type node;
+ typedef T value_type;
+ typedef NodePtr node_ptr;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const node>::type const_node_ptr;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<T>::type pointer;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const T>::type const_pointer;
+ typedef T & reference;
+ typedef const T & const_reference;
+ typedef node& node_reference;
+ typedef const node & const_node_reference;
+
+ static node_ptr to_node_ptr(reference value)
+ {
+ return pointer_traits<node_ptr>::pointer_to
+ (static_cast<node_reference>(value.*P));
+ }
+
+ static const_node_ptr to_node_ptr(const_reference value)
+ {
+ return pointer_traits<const_node_ptr>::pointer_to
+ (static_cast<const_node_reference>(value.*P));
+ }
+
+ static pointer to_value_ptr(const node_ptr & n)
+ {
+ return pointer_traits<pointer>::pointer_to
+ (*detail::parent_from_member<T, node>
+ (boost::intrusive::detail::to_raw_pointer(n), P));
+ }
+
+ static const_pointer to_value_ptr(const const_node_ptr & n)
+ {
+ return pointer_traits<const_pointer>::pointer_to
+ (*detail::parent_from_member<T, node>
+ (boost::intrusive::detail::to_raw_pointer(n), P));
+ }
+};
+
+
+template<class T, class NodeTraits, typename NodeTraits::node T::* P, link_mode_type LinkMode>
+struct mhtraits
+ : public mhtraits_base<T, typename NodeTraits::node_ptr, P>
+{
+ static const link_mode_type link_mode = LinkMode;
+ typedef NodeTraits node_traits;
+};
+*/
+
+
+template<class T, class Hook, Hook T::* P>
+struct mhtraits
+{
+ public:
+ typedef Hook hook_type;
+ typedef typename hook_type::hooktags::node_traits node_traits;
+ typedef typename node_traits::node node;
+ typedef T value_type;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<T>::type pointer;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const T>::type const_pointer;
+ typedef T & reference;
+ typedef const T & const_reference;
+ typedef node& node_reference;
+ typedef const node & const_node_reference;
+ typedef hook_type& hook_reference;
+ typedef const hook_type & const_hook_reference;
+
+ static const link_mode_type link_mode = Hook::hooktags::link_mode;
+
+ static node_ptr to_node_ptr(reference value)
+ {
+ return pointer_traits<node_ptr>::pointer_to
+ (static_cast<node_reference>(static_cast<hook_reference>(value.*P)));
+ }
+
+ static const_node_ptr to_node_ptr(const_reference value)
+ {
+ return pointer_traits<const_node_ptr>::pointer_to
+ (static_cast<const_node_reference>(static_cast<const_hook_reference>(value.*P)));
+ }
+
+ static pointer to_value_ptr(const node_ptr & n)
+ {
+ return pointer_traits<pointer>::pointer_to
+ (*detail::parent_from_member<T, Hook>
+ (static_cast<Hook*>(boost::intrusive::detail::to_raw_pointer(n)), P));
+ }
+
+ 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));
+ }
+};
+
+
+template<class Functor>
+struct fhtraits
+{
+ public:
+ typedef typename Functor::hook_type hook_type;
+ typedef typename Functor::hook_ptr hook_ptr;
+ typedef typename Functor::const_hook_ptr const_hook_ptr;
+ typedef typename hook_type::hooktags::node_traits node_traits;
+ typedef typename node_traits::node node;
+ typedef typename Functor::value_type value_type;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<value_type>::type pointer;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const value_type>::type const_pointer;
+ typedef value_type & reference;
+ typedef const value_type & const_reference;
+ 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))); }
+
+ 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))); }
+
+ static pointer to_value_ptr(const node_ptr & n)
+ { return Functor::to_value_ptr(to_hook_ptr(n)); }
+
+ static const_pointer to_value_ptr(const const_node_ptr & n)
+ { return Functor::to_value_ptr(to_hook_ptr(n)); }
+
+ private:
+ static hook_ptr to_hook_ptr(const node_ptr & n)
+ { return hook_ptr(&*static_cast<hook_type*>(&*n)); }
+
+ static const_hook_ptr to_hook_ptr(const const_node_ptr & n)
+ { return const_hook_ptr(&*static_cast<const hook_type*>(&*n)); }
+};
+
+template<class ValueTraits>
+struct value_traits_pointers
+{
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ (boost::intrusive::detail::
+ , ValueTraits, value_traits_ptr
+ , typename pointer_traits<typename ValueTraits::node_traits::node_ptr>::template
+ rebind_pointer<ValueTraits>::type) value_traits_ptr;
+
+ typedef typename pointer_traits<value_traits_ptr>::template
+ rebind_pointer<ValueTraits const>::type const_value_traits_ptr;
+};
+
+template<class ValueTraits, bool IsConst, class Category>
+struct iiterator
+{
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node node;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef ::boost::intrusive::pointer_traits<node_ptr> nodepointer_traits_t;
+ typedef typename nodepointer_traits_t::template
+ rebind_pointer<void>::type void_pointer;
+ typedef typename ValueTraits::value_type value_type;
+ typedef typename ValueTraits::pointer nonconst_pointer;
+ typedef typename ValueTraits::const_pointer yesconst_pointer;
+ typedef typename ::boost::intrusive::pointer_traits
+ <nonconst_pointer>::reference nonconst_reference;
+ typedef typename ::boost::intrusive::pointer_traits
+ <yesconst_pointer>::reference yesconst_reference;
+ typedef typename nodepointer_traits_t::difference_type difference_type;
+ typedef typename detail::if_c
+ <IsConst, yesconst_pointer, nonconst_pointer>::type pointer;
+ typedef typename detail::if_c
+ <IsConst, yesconst_reference, nonconst_reference>::type reference;
+ typedef std::iterator
+ < Category
+ , value_type
+ , difference_type
+ , pointer
+ , reference
+ > iterator_traits;
+ typedef typename value_traits_pointers
+ <ValueTraits>::value_traits_ptr value_traits_ptr;
+ typedef typename value_traits_pointers
+ <ValueTraits>::const_value_traits_ptr const_value_traits_ptr;
+ static const bool stateful_value_traits =
+ detail::is_stateful_value_traits<value_traits>::value;
+};
+
+template<class NodePtr, class StoredPointer, bool StatefulValueTraits = true>
+struct iiterator_members
+{
+
+ iiterator_members()
+ {}
+
+ iiterator_members(const NodePtr &n_ptr, const StoredPointer &data)
+ : nodeptr_(n_ptr), ptr_(data)
+ {}
+
+ StoredPointer get_ptr() const
+ { return ptr_; }
+
+ NodePtr nodeptr_;
+ StoredPointer ptr_;
+};
+
+template<class NodePtr, class StoredPointer>
+struct iiterator_members<NodePtr, StoredPointer, false>
+{
+ iiterator_members()
+ {}
+
+ iiterator_members(const NodePtr &n_ptr, const StoredPointer &)
+ : nodeptr_(n_ptr)
+ {}
+
+ StoredPointer get_ptr() const
+ { return StoredPointer(); }
+
+ NodePtr nodeptr_;
+};
+
+template<class Less, class T>
+struct get_less
+{
+ typedef Less type;
+};
+
+template<class T>
+struct get_less<void, T>
+{
+ typedef ::std::less<T> type;
+};
+
+template<class EqualTo, class T>
+struct get_equal_to
+{
+ typedef EqualTo type;
+};
+
+template<class T>
+struct get_equal_to<void, T>
+{
+ typedef ::std::equal_to<T> type;
+};
+
+template<class Hash, class T>
+struct get_hash
+{
+ typedef Hash type;
+};
+
+template<class T>
+struct get_hash<void, T>
+{
+ typedef ::boost::hash<T> type;
+};
+
+struct empty{};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_DETAIL_UTILITIES_HPP
diff --git a/3rdParty/Boost/src/boost/intrusive/detail/workaround.hpp b/3rdParty/Boost/src/boost/intrusive/detail/workaround.hpp
index 87cab4b..71a50c8 100644
--- a/3rdParty/Boost/src/boost/intrusive/detail/workaround.hpp
+++ b/3rdParty/Boost/src/boost/intrusive/detail/workaround.hpp
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2013. 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)
//
@@ -13,10 +13,14 @@
#include <boost/intrusive/detail/config_begin.hpp>
-#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_INTRUSIVE_PERFECT_FORWARDING
#endif
+//Macros for documentation purposes. For code, expands to the argument
+#define BOOST_INTRUSIVE_IMPDEF(TYPE) TYPE
+#define BOOST_INTRUSIVE_SEEDOC(TYPE) TYPE
+
#include <boost/intrusive/detail/config_end.hpp>
#endif //#ifndef BOOST_INTRUSIVE_DETAIL_WRKRND_HPP