Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion include/boost/heap/detail/mutable_heap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,9 @@ class priority_queue_mutable_wrapper
template <class... Args>
handle_type emplace(Args&&... args)
{
objects.push_front(std::make_pair(std::forward<Args>(args)..., 0));
objects.emplace_front(std::piecewise_construct,
std::forward_as_tuple(std::forward<Args>(args)...),
std::forward_as_tuple(0));
list_iterator ret = objects.begin();
q_.push(ret);
return handle_type(ret);
Expand Down
7 changes: 7 additions & 0 deletions test/d_ary_heap_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ void run_d_ary_heap_mutable_test(void)
> stable_pri_queue;
run_stable_heap_tests<stable_pri_queue>();
}

#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
cmpthings ord;
boost::heap::d_ary_heap<thing, boost::heap::mutable_<true>, boost::heap::arity<D>,
boost::heap::compare<cmpthings>, boost::heap::stable<stable> > vpq(ord);
vpq.emplace(5, 6, 7);
#endif
}

BOOST_AUTO_TEST_CASE( d_ary_heap_mutable_test )
Expand Down