id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10003,Fibonacci heaps base class not copy constructible.,Raffi Enficiaud,timblechmann,"The following code does not compile on Windows / Visual Express 2013 x64. {{{ #!div style=""font-size: 80%"" Code highlighting: {{{#!C++ BOOST_AUTO_TEST_CASE(test_heap_vector) { typedef boost::heap::fibonacci_heap > > low_heap_t; low_heap_t lowh; const int K = 7; boost::random::uniform_real_distribution dist; // preparing the heap for(int i = 0; i < 100; i++) { double current = dist(rng); if(lowh.size() < K) { lowh.push(current); } else if(lowh.value_comp()(current, lowh.top())) { lowh.push(current); lowh.pop(); } } BOOST_CHECK_EQUAL(lowh.size(), K); // duplicating in the vector std::vector v(10, lowh); for(int i = 0; i < 10; i++) { BOOST_CHECK_EQUAL(v[i].size(), K); } } }}} }}} The compiler gives me this: {{{ 1>d:\Code\thirdparties\visual2013x64\boost_1_55\include\boost-1_55\boost/heap/fibonacci_heap.hpp(224): error C2664: 'boost::heap::detail::make_fibonacci_heap_base>,ArgumentPack>>::type::type(boost::heap::detail::make_fibonacci_heap_base>,ArgumentPack>>::type &)' : impossible de convertir l'argument 1 de 'const boost::heap::fibonacci_heap>,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_>' en 'const std::less &' 1> with 1> [ 1> T=double 1> , ArgumentPack=boost::parameter::aux::empty_arg_list 1> ] 1> Raison : impossible de convertir de 'const boost::heap::fibonacci_heap>,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_>' en 'const std::less' 1> Aucun opérateur de conversion définie par l'utilisateur disponible qui puisse effectuer cette conversion, ou l'opérateur ne peut pas être appelé 1> d:\Code\thirdparties\visual2013x64\boost_1_55\include\boost-1_55\boost/heap/fibonacci_heap.hpp(222) : lors de la compilation de la fonction membre 'boost::heap::fibonacci_heap>,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_>::fibonacci_heap(const boost::heap::fibonacci_heap>,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_> &)' de la classe modèle 1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory0(593) : voir la référence à l'instanciation de la fonction modèle 'boost::heap::fibonacci_heap>,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_>::fibonacci_heap(const boost::heap::fibonacci_heap>,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_,boost::parameter::void_> &)' en cours de compilation ========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ========== }}} Apparently it comes from {{{ #!div style=""font-size: 80%"" Code highlighting: {{{#!C++ make_fibonacci_heap_base::type }}} }}} Creating a copy constructor and moving the assignment operator out of the #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES / #endif seems to work. {{{ #!div style=""font-size: 80%"" Code highlighting: {{{#!C++ struct type: base_type, allocator_type { type(compare_argument const & arg): base_type(arg) {} type(type const & rhs): base_type(static_cast(rhs)), allocator_type(static_cast(rhs)) {} #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES type(type && rhs): base_type(std::move(static_cast(rhs))), allocator_type(std::move(static_cast(rhs))) {} type(type & rhs): base_type(static_cast(rhs)), allocator_type(static_cast(rhs)) {} type & operator=(type && rhs) { base_type::operator=(std::move(static_cast(rhs))); allocator_type::operator=(std::move(static_cast(rhs))); return *this; } #endif type & operator=(type const & rhs) { base_type::operator=(static_cast(rhs)); allocator_type::operator=(static_cast(rhs)); return *this; } }; }}} }}}",Bugs,closed,To Be Determined,heap,Boost 1.55.0,Problem,fixed,,raffi.enficiaud@…