id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12968,avl_set: regression when sorting by void*,j.gajdosik@…,Ion Gaztañaga,"The code below compiles (and works) well with boost-1.58, but failes to compile with boost-1.59 and above: -------compiler output of gcc version 4.9.4 (Gentoo 4.9.4 p1.0, pie-0.6.4)------------------ In file included from /usr/include/boost/intrusive/bstree.hpp:33:0, from /usr/include/boost/intrusive/avltree.hpp:24, from /usr/include/boost/intrusive/avl_set.hpp:17, from avl_test1.cpp:1: /usr/include/boost/intrusive/detail/key_nodeptr_comp.hpp: In instantiation of 'bool boost::intrusive::detail::key_nodeptr_comp::operator()(const T1&, typename boost::move_detail::enable_if_c::is_same_or_nodeptr_convertible::value>::type*) const [with T1 = boost::intrusive::avltree_node*; KeyTypeKeyCompare = EntryType::KeyCompareById; ValueTraits = boost::intrusive::mhtraits, &EntryType::avl_by_id_hook>; KeyOfValue = boost::move_detail::identity; typename boost::move_detail::enable_if_c::is_same_or_nodeptr_convertible::value>::type = void]': /usr/include/boost/intrusive/bstree_algorithms.hpp:2025:24: required from 'static boost::intrusive::bstree_algorithms::node_ptr boost::intrusive::bstree_algorithms::lower_bound_loop(boost::intrusive::bstree_algorithms::node_ptr, boost::intrusive::bstree_algorithms::node_ptr, const KeyType&, KeyNodePtrCompare) [with KeyType = void*; KeyNodePtrCompare = boost::intrusive::detail::key_nodeptr_comp, &EntryType::avl_by_id_hook>, boost::move_detail::identity >; NodeTraits = boost::intrusive::avltree_node_traits; boost::intrusive::bstree_algorithms::node_ptr = boost::intrusive::avltree_node*]' /usr/include/boost/intrusive/bstree_algorithms.hpp:917:96: required from 'static boost::intrusive::bstree_algorithms::node_ptr boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&, const KeyType&, KeyNodePtrCompare) [with KeyType = void*; KeyNodePtrCompare = boost::intrusive::detail::key_nodeptr_comp, &EntryType::avl_by_id_hook>, boost::move_detail::identity >; NodeTraits = boost::intrusive::avltree_node_traits; boost::intrusive::bstree_algorithms::node_ptr = boost::intrusive::avltree_node*; boost::intrusive::bstree_algorithms::const_node_ptr = const boost::intrusive::avltree_node*]' /usr/include/boost/intrusive/bstree_algorithms.hpp:751:49: required from 'static boost::intrusive::bstree_algorithms::node_ptr boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&, KeyNodePtrCompare) [with KeyType = void*; KeyNodePtrCompare = boost::intrusive::detail::key_nodeptr_comp, &EntryType::avl_by_id_hook>, boost::move_detail::identity >; NodeTraits = boost::intrusive::avltree_node_traits; boost::intrusive::bstree_algorithms::node_ptr = boost::intrusive::avltree_node*; boost::intrusive::bstree_algorithms::const_node_ptr = const boost::intrusive::avltree_node*]' /usr/include/boost/intrusive/bstree.hpp:382:83: required from 'boost::intrusive::bstbase2::iterator boost::intrusive::bstbase2::find(const KeyType&, KeyTypeKeyCompare) [with KeyType = void*; KeyTypeKeyCompare = EntryType::KeyCompareById; ValueTraits = boost::intrusive::mhtraits, &EntryType::avl_by_id_hook>; VoidOrKeyOfValue = void; VoidOrKeyComp = EntryType::CompareById; boost::intrusive::algo_types AlgoType = (boost::intrusive::algo_types)6u; HeaderHolder = void; boost::intrusive::bstbase2::iterator = boost::intrusive::tree_iterator, &EntryType::avl_by_id_hook>, false>]' avl_test1.cpp:33:39: required from here /usr/include/boost/intrusive/detail/key_nodeptr_comp.hpp:87:69: error: no match for call to '(EntryType::KeyCompareById) (const EntryType&)' { return base().get()(key_of_value()(*traits_->to_value_ptr(t1))); } ^ avl_test1.cpp:14:10: note: candidates are: struct KeyCompareById { ^ avl_test1.cpp:15:10: note: bool EntryType::KeyCompareById::operator()(void* const&, const EntryType&) const bool operator()(const Type &id,const EntryType &b) const ^ avl_test1.cpp:15:10: note: candidate expects 2 arguments, 1 provided avl_test1.cpp:17:10: note: bool EntryType::KeyCompareById::operator()(const EntryType&, void* const&) const bool operator()(const EntryType &a,const Type &id) const ^ avl_test1.cpp:17:10: note: candidate expects 2 arguments, 1 provided ----------------------end of compiler output--------------------------------- Note: when writing ""typedef int *Type;"" instead of ""typedef void *Type;"" it compiles. ",Bugs,closed,To Be Determined,intrusive,Boost 1.63.0,Problem,duplicate,,