[Boost-bugs] [Boost C++ Libraries] #8195: emplace method broken in boost heaps

Subject: [Boost-bugs] [Boost C++ Libraries] #8195: emplace method broken in boost heaps
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-27 22:57:49


#8195: emplace method broken in boost heaps
---------------------------------+------------------------------------------
 Reporter: rob.patro@… | Owner: timblechmann
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: heap
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 The emplace operator does not correctly forward arguments to the type
 contained in the heap. I've attached a simple program that reproduces
 this bug. Compiling the attached program (on OSX 10.8.2 with gcc-4.7.2)
 produces the following error:


 {{{
 In file included from testpq.cpp:1:0:
 /opt/local/include/boost/heap/skew_heap.hpp: In instantiation of
 'boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5, A6>::node_pointer
 boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5,
 A6>::emplace_internal(Args&& ...) [with Args = {int, int}; T = thing; A0 =
 boost::heap::compare<cmpthings>; A1 = boost::parameter::void_; A2 =
 boost::parameter::void_; A3 = boost::parameter::void_; A4 =
 boost::parameter::void_; A5 = boost::parameter::void_; A6 =
 boost::parameter::void_; boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5,
 A6>::node_pointer = boost::heap::detail::skew_heap_node<thing, false>*]':
 /opt/local/include/boost/heap/skew_heap.hpp:769:13: required from
 'static void boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5,
 A6>::push_void::emplace(boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5,
 A6>*, Args&& ...) [with Args = {int, int}; T = thing; A0 =
 boost::heap::compare<cmpthings>; A1 = boost::parameter::void_; A2 =
 boost::parameter::void_; A3 = boost::parameter::void_; A4 =
 boost::parameter::void_; A5 = boost::parameter::void_; A6 =
 boost::parameter::void_; boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5,
 A6> = boost::heap::skew_heap<thing, boost::heap::compare<cmpthings> >]'
 /opt/local/include/boost/heap/skew_heap.hpp:437:70: required from
 'typename boost::mpl::if_c<boost::heap::skew_heap<T, A0, A1, A2, A3, A4,
 A5, A6>::is_mutable, typename boost::mpl::if_c<boost::heap::skew_heap<T,
 A0, A1, A2, A3, A4, A5, A6>::is_mutable, typename
 boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5,
 A6>::implementation_defined::handle_type, void*>::type, void>::type
 boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5, A6>::emplace(Args&& ...)
 [with Args = {int, int}; T = thing; A0 = boost::heap::compare<cmpthings>;
 A1 = boost::parameter::void_; A2 = boost::parameter::void_; A3 =
 boost::parameter::void_; A4 = boost::parameter::void_; A5 =
 boost::parameter::void_; A6 = boost::parameter::void_; typename
 boost::mpl::if_c<boost::heap::skew_heap<T, A0, A1, A2, A3, A4, A5,
 A6>::is_mutable, typename boost::mpl::if_c<boost::heap::skew_heap<T, A0,
 A1, A2, A3, A4, A5, A6>::is_mutable, typename boost::heap::skew_heap<T,
 A0, A1, A2, A3, A4, A5, A6>::implementation_defined::handle_type,
 void*>::type, void>::type = void]'
 testpq.cpp:27:20: required from here
 /opt/local/include/boost/heap/skew_heap.hpp:808:9: error: no matching
 function for call to 'boost::heap::skew_heap<thing,
 boost::heap::compare<cmpthings> >::make_node(int, int)'
 /opt/local/include/boost/heap/skew_heap.hpp:808:9: note: candidates are:
 In file included from /opt/local/include/boost/heap/skew_heap.hpp:21:0,
                  from testpq.cpp:1:
 /opt/local/include/boost/heap/detail/stable_heap.hpp:189:19: note:
 boost::heap::detail::heap_base<T, Cmp, constant_time_size,
 StabilityCounterType, stable>::internal_type
 boost::heap::detail::heap_base<T, Cmp, constant_time_size,
 StabilityCounterType, stable>::make_node(const T&) [with T = thing; Cmp =
 cmpthings; bool constant_time_size = true; StabilityCounterType = long
 unsigned int; bool stable = false; boost::heap::detail::heap_base<T, Cmp,
 constant_time_size, StabilityCounterType, stable>::internal_type = thing]
 /opt/local/include/boost/heap/detail/stable_heap.hpp:189:19: note:
 candidate expects 1 argument, 2 provided
 /opt/local/include/boost/heap/detail/stable_heap.hpp:195:10: note: T&&
 boost::heap::detail::heap_base<T, Cmp, constant_time_size,
 StabilityCounterType, stable>::make_node(T&&) [with T = thing; Cmp =
 cmpthings; bool constant_time_size = true; StabilityCounterType = long
 unsigned int; bool stable = false]
 /opt/local/include/boost/heap/detail/stable_heap.hpp:195:10: note:
 candidate expects 1 argument, 2 provided
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8195>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC