mirror of
https://github.com/boostorg/container.git
synced 2026-01-29 09:50:22 +01:00
Try to definitely fix Trac Issue #9931 (flat_map::insert(ordered_unique_range_t...) fails with move_iterators")
This commit is contained in:
@@ -995,7 +995,11 @@ class flat_tree
|
||||
while(len--){
|
||||
BidirIt next(first);
|
||||
++next;
|
||||
if(next == last || val_cmp(*first, *next)){
|
||||
//Use iterator_traits<BidirIt>::value_type
|
||||
//because it can be different from container::value_type
|
||||
//(e.g. conversion between std::pair<T1, T2> -> boost::container::pair<T1, T2>
|
||||
const typename boost::container::iterator_traits<BidirIt>::value_type & val = *first;
|
||||
if (next == last || val_cmp(val, *next)){
|
||||
const bool room = this->m_data.m_vect.stable_emplace_back(*first);
|
||||
(void)room;
|
||||
BOOST_ASSERT(room);
|
||||
|
||||
Reference in New Issue
Block a user