Opened 6 years ago
Closed 6 years ago
#12432 closed Bugs (fixed)
Forced KeyOfValue creation when using custom compare on insert_check
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | intrusive |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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
Attachments (1)
Change History (2)
by , 6 years ago
Attachment: | intrusive_key_error.cpp added |
---|
comment:1 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for the report and the test case. Fixed in commit:
https://github.com/boostorg/intrusive/commit/9ac060a6aeb9dfd1a0bc0c70639d13dcc30258de
hopefully will be ready for Boost 1.62.
full code snippet