mirror of
https://github.com/boostorg/container.git
synced 2025-07-31 04:57:16 +02:00
Roll back and use dtl::value_init to maximize compatibility between std versions
This commit is contained in:
@ -1673,8 +1673,9 @@ class flat_map
|
||||
iterator i = this->lower_bound(k);
|
||||
// i->first is greater than or equivalent to k.
|
||||
if (i == end() || key_comp()(k, (*i).first)){
|
||||
impl_value_type v(k, mapped_type());
|
||||
i = this->m_flat_tree.insert_equal(::boost::move(v));
|
||||
dtl::value_init<mapped_type> m;
|
||||
impl_value_type v(k, ::boost::move(m.m_t));
|
||||
i = dtl::force_copy<iterator>(this->m_flat_tree.insert_equal(::boost::move(v)));
|
||||
}
|
||||
return (*i).second;
|
||||
}
|
||||
@ -1684,8 +1685,9 @@ class flat_map
|
||||
iterator i = this->lower_bound(k);
|
||||
// i->first is greater than or equivalent to k.
|
||||
if (i == end() || key_comp()(k, (*i).first)) {
|
||||
impl_value_type v(boost::move(k), mapped_type());
|
||||
i = this->m_flat_tree.insert_equal(::boost::move(v));
|
||||
dtl::value_init<mapped_type> m;
|
||||
impl_value_type v(::boost::move(k), ::boost::move(m.m_t));
|
||||
i = dtl::force_copy<iterator>(this->m_flat_tree.insert_equal(::boost::move(v)));
|
||||
}
|
||||
return (*i).second;
|
||||
}
|
||||
|
Reference in New Issue
Block a user