Subject: [Boost-bugs] [Boost C++ Libraries] #12432: Forced KeyOfValue creation when using custom compare on insert_check
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-09-02 13:19:24
#12432: Forced KeyOfValue creation when using custom compare on insert_check
-------------------------------+------------------------
Reporter: kiril.dimitroff@⦠| Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: intrusive
Version: Boost 1.59.0 | Severity: Problem
Keywords: |
-------------------------------+------------------------
Introducing key_of_value in 1.59 seems to have broken the custom compare
feature (including subsequent versions):
{{{
int first;
explicit MyClass(int i) : first(i){}
}}}
''Compr'' defines strict ordering between MyClass and int.
{{{
typedef set< MyClass, compare<MyClass::Compr> > OrderedMap;
...
int i = 1;
auto ret = omap.insert_check(i, omap.value_comp(), commit_data);
}}}
triggers the following error:
boost_1_59_0/boost/intrusive/detail/tree_value_compare.hpp:64:26: error:
no match for call to â(boost::move_detail::identity<MyClass>) (const
int&)â
{ return KeyOfValue()(key); }
using gcc-5.4
Full snippet attached
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12432> 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:20 UTC