summaryrefslogtreecommitdiff
path: root/boost/intrusive
diff options
context:
space:
mode:
Diffstat (limited to 'boost/intrusive')
-rw-r--r--boost/intrusive/bstree.hpp2
-rw-r--r--boost/intrusive/bstree_algorithms.hpp3
-rw-r--r--boost/intrusive/detail/key_nodeptr_comp.hpp14
-rw-r--r--boost/intrusive/slist.hpp2
-rw-r--r--boost/intrusive/treap.hpp2
5 files changed, 15 insertions, 8 deletions
diff --git a/boost/intrusive/bstree.hpp b/boost/intrusive/bstree.hpp
index f2cdb428b4..1eeab55113 100644
--- a/boost/intrusive/bstree.hpp
+++ b/boost/intrusive/bstree.hpp
@@ -967,7 +967,7 @@ class bstree_impl
void swap(bstree_impl& other)
{
//This can throw
- ::boost::adl_move_swap(this->comp(), this->comp());
+ ::boost::adl_move_swap(this->comp(), other.comp());
//These can't throw
node_algorithms::swap_tree(this->header_ptr(), node_ptr(other.header_ptr()));
this->sz_traits().swap(other.sz_traits());
diff --git a/boost/intrusive/bstree_algorithms.hpp b/boost/intrusive/bstree_algorithms.hpp
index e8caee0c94..e449ebac08 100644
--- a/boost/intrusive/bstree_algorithms.hpp
+++ b/boost/intrusive/bstree_algorithms.hpp
@@ -37,6 +37,9 @@ namespace intrusive {
template <class NodePtr>
struct insert_commit_data_t
{
+ BOOST_INTRUSIVE_FORCEINLINE insert_commit_data_t()
+ : link_left(false), node()
+ {}
bool link_left;
NodePtr node;
};
diff --git a/boost/intrusive/detail/key_nodeptr_comp.hpp b/boost/intrusive/detail/key_nodeptr_comp.hpp
index 9d64f09bcd..bdc025e5ab 100644
--- a/boost/intrusive/detail/key_nodeptr_comp.hpp
+++ b/boost/intrusive/detail/key_nodeptr_comp.hpp
@@ -59,6 +59,10 @@ struct key_nodeptr_comp
//Use public inheritance to avoid MSVC bugs with closures
: public key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue>::base_t
{
+private:
+ struct sfinae_type;
+
+public:
typedef key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue> types_t;
typedef typename types_t::value_traits value_traits;
typedef typename types_t::value_type value_type;
@@ -83,32 +87,32 @@ struct key_nodeptr_comp
//pred(pnode)
template<class T1>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value >::type* =0) const
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value, sfinae_type* >::type = 0) const
{ return base().get()(key_of_value()(*traits_->to_value_ptr(t1))); }
//operator() 2 arg
//pred(pnode, pnode)
template<class T1, class T2>
BOOST_INTRUSIVE_FORCEINLINE bool operator()
- (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
+ (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
{ return base()(*traits_->to_value_ptr(t1), *traits_->to_value_ptr(t2)); }
//pred(pnode, key)
template<class T1, class T2>
BOOST_INTRUSIVE_FORCEINLINE bool operator()
- (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
+ (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
{ return base()(*traits_->to_value_ptr(t1), t2); }
//pred(key, pnode)
template<class T1, class T2>
BOOST_INTRUSIVE_FORCEINLINE bool operator()
- (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
+ (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
{ return base()(t1, *traits_->to_value_ptr(t2)); }
//pred(key, key)
template<class T1, class T2>
BOOST_INTRUSIVE_FORCEINLINE bool operator()
- (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
+ (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
{ return base()(t1, t2); }
const ValueTraits *const traits_;
diff --git a/boost/intrusive/slist.hpp b/boost/intrusive/slist.hpp
index 00206990f6..f34350d80f 100644
--- a/boost/intrusive/slist.hpp
+++ b/boost/intrusive/slist.hpp
@@ -1115,7 +1115,7 @@ class slist_impl
//!
//! <b>Throws</b>: Nothing.
//!
- //! <b>Complexity</b>: Lineal to the elements (l - before_f + 1).
+ //! <b>Complexity</b>: Linear to the elements (l - before_f + 1).
//!
//! <b>Note</b>: Invalidates the iterators to the erased element.
template<class Disposer>
diff --git a/boost/intrusive/treap.hpp b/boost/intrusive/treap.hpp
index 8567072d54..c6f63ff2de 100644
--- a/boost/intrusive/treap.hpp
+++ b/boost/intrusive/treap.hpp
@@ -354,9 +354,9 @@ class treap_impl
//! <b>Throws</b>: If the comparison functor's swap call throws.
void swap(treap_impl& other)
{
- tree_type::swap(other);
//This can throw
::boost::adl_move_swap(this->priv_pcomp(), other.priv_pcomp());
+ tree_type::swap(other);
}
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.