mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
Fixed error in insertions with input iterator ranges
[SVN r80193]
This commit is contained in:
@@ -1603,8 +1603,10 @@ class deque : protected deque_base<T, A>
|
||||
template <class InpIt>
|
||||
void priv_insert_aux(const_iterator pos, InpIt first, InpIt last, std::input_iterator_tag)
|
||||
{
|
||||
iterator it(pos);
|
||||
for(;first != last; ++first){
|
||||
this->insert(pos, boost::move(value_type(*first)));
|
||||
it = this->emplace(it, *first);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1412,9 +1412,10 @@ class vector : private container_detail::vector_alloc_holder<A>
|
||||
template <class InIt>
|
||||
void priv_range_insert(const_iterator pos, InIt first, InIt last, std::input_iterator_tag)
|
||||
{
|
||||
iterator it(pos.get_ptr());
|
||||
for(;first != last; ++first){
|
||||
pos = this->emplace(pos, *first);
|
||||
++pos;
|
||||
it = this->emplace(it, *first);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user