forked from boostorg/intrusive
Fixes #38
This commit is contained in:
@@ -3886,6 +3886,7 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
|
|||||||
* Fixed bugs:
|
* Fixed bugs:
|
||||||
* [@https://github.com/boostorg/intrusive/pull/33 GitHub Pull #33: ['Fix compilation in case if key is void*, again]]
|
* [@https://github.com/boostorg/intrusive/pull/33 GitHub Pull #33: ['Fix compilation in case if key is void*, again]]
|
||||||
* [@https://github.com/boostorg/intrusive/issues/35 GitHub Issue #35: ['key_of_value on treap_set seems to be broken in 1.69]]
|
* [@https://github.com/boostorg/intrusive/issues/35 GitHub Issue #35: ['key_of_value on treap_set seems to be broken in 1.69]]
|
||||||
|
* [@https://github.com/boostorg/intrusive/issues/38 GitHub Issue #38: ['treap: Same type for priority and key comparison leads to ambiguous base class error]]
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
@@ -158,7 +158,7 @@ template<typename T>
|
|||||||
struct is_unary_or_binary_function : is_unary_or_binary_function_impl<T>
|
struct is_unary_or_binary_function : is_unary_or_binary_function_impl<T>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
template<typename T, bool = is_unary_or_binary_function<T>::value>
|
template<typename T, typename Tag = void, bool = is_unary_or_binary_function<T>::value>
|
||||||
class ebo_functor_holder
|
class ebo_functor_holder
|
||||||
{
|
{
|
||||||
BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
|
BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
|
||||||
@@ -222,8 +222,8 @@ class ebo_functor_holder
|
|||||||
T t_;
|
T t_;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T, typename Tag>
|
||||||
class ebo_functor_holder<T, false>
|
class ebo_functor_holder<T, Tag, false>
|
||||||
: public T
|
: public T
|
||||||
{
|
{
|
||||||
BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
|
BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
|
||||||
|
@@ -66,6 +66,8 @@ struct treap_prio_types
|
|||||||
>::type priority_compare;
|
>::type priority_compare;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct treap_tag;
|
||||||
|
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
//! The class template treap is an intrusive treap container that
|
//! The class template treap is an intrusive treap container that
|
||||||
@@ -92,7 +94,7 @@ class treap_impl
|
|||||||
//Use public inheritance to avoid MSVC bugs with closures
|
//Use public inheritance to avoid MSVC bugs with closures
|
||||||
, public detail::ebo_functor_holder
|
, public detail::ebo_functor_holder
|
||||||
< typename treap_prio_types<typename ValueTraits::pointer, VoidOrPrioOfValue, VoidOrPrioComp>::priority_compare
|
< typename treap_prio_types<typename ValueTraits::pointer, VoidOrPrioOfValue, VoidOrPrioComp>::priority_compare
|
||||||
>
|
, treap_tag>
|
||||||
/// @endcond
|
/// @endcond
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -107,7 +109,7 @@ class treap_impl
|
|||||||
, VoidOrPrioOfValue, VoidOrPrioComp> treap_prio_types_t;
|
, VoidOrPrioOfValue, VoidOrPrioComp> treap_prio_types_t;
|
||||||
|
|
||||||
typedef detail::ebo_functor_holder
|
typedef detail::ebo_functor_holder
|
||||||
<typename treap_prio_types_t::priority_compare> prio_base;
|
<typename treap_prio_types_t::priority_compare, treap_tag> prio_base;
|
||||||
|
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
@@ -173,7 +175,7 @@ class treap_impl
|
|||||||
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
|
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
|
||||||
//! or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee.
|
//! or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee.
|
||||||
treap_impl()
|
treap_impl()
|
||||||
: tree_type(), prio_base(priority_compare())
|
: tree_type(), prio_base()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! <b>Effects</b>: Constructs an empty container.
|
//! <b>Effects</b>: Constructs an empty container.
|
||||||
|
Reference in New Issue
Block a user