mirror of
https://github.com/boostorg/intrusive.git
synced 2025-08-03 14:34:44 +02:00
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:
|
||||
* [@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/38 GitHub Issue #38: ['treap: Same type for priority and key comparison leads to ambiguous base class error]]
|
||||
|
||||
[endsect]
|
||||
|
||||
|
@@ -158,7 +158,7 @@ template<typename T>
|
||||
struct is_unary_or_binary_function : is_unary_or_binary_function_impl<T>
|
||||
{};
|
||||
|
||||
template<typename T, bool = is_unary_or_binary_function<T>::value>
|
||||
template<typename T, typename Tag = void, bool = is_unary_or_binary_function<T>::value>
|
||||
class ebo_functor_holder
|
||||
{
|
||||
BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
|
||||
@@ -222,8 +222,8 @@ class ebo_functor_holder
|
||||
T t_;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class ebo_functor_holder<T, false>
|
||||
template<typename T, typename Tag>
|
||||
class ebo_functor_holder<T, Tag, false>
|
||||
: public T
|
||||
{
|
||||
BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
|
||||
|
@@ -66,6 +66,8 @@ struct treap_prio_types
|
||||
>::type priority_compare;
|
||||
};
|
||||
|
||||
struct treap_tag;
|
||||
|
||||
/// @endcond
|
||||
|
||||
//! 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
|
||||
, public detail::ebo_functor_holder
|
||||
< typename treap_prio_types<typename ValueTraits::pointer, VoidOrPrioOfValue, VoidOrPrioComp>::priority_compare
|
||||
>
|
||||
, treap_tag>
|
||||
/// @endcond
|
||||
{
|
||||
public:
|
||||
@@ -104,10 +106,10 @@ class treap_impl
|
||||
typedef tree_type implementation_defined;
|
||||
typedef treap_prio_types
|
||||
< typename ValueTraits::pointer
|
||||
, VoidOrPrioOfValue, VoidOrPrioComp> treap_prio_types_t;
|
||||
, VoidOrPrioOfValue, VoidOrPrioComp> treap_prio_types_t;
|
||||
|
||||
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
|
||||
|
||||
@@ -173,7 +175,7 @@ class treap_impl
|
||||
//! 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.
|
||||
treap_impl()
|
||||
: tree_type(), prio_base(priority_compare())
|
||||
: tree_type(), prio_base()
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty container.
|
||||
|
Reference in New Issue
Block a user