mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
Change insert/erase as specified in n2369, the implementation and tests.
I accidently only checked in the documentation from these changes in the last check in. This contains the rest of it. [SVN r39950]
This commit is contained in:
@ -158,47 +158,32 @@ namespace boost
|
||||
base.insert(obj));
|
||||
}
|
||||
|
||||
iterator insert(iterator hint, const value_type& obj)
|
||||
iterator insert(const_iterator hint, const value_type& obj)
|
||||
{
|
||||
return iterator(base.insert(get(hint), obj));
|
||||
}
|
||||
|
||||
const_iterator insert(const_iterator hint, const value_type& obj)
|
||||
{
|
||||
return const_iterator(base.insert(get(hint), obj));
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
void insert(InputIterator first, InputIterator last)
|
||||
{
|
||||
base.insert(first, last);
|
||||
}
|
||||
|
||||
iterator erase(iterator position)
|
||||
iterator erase(const_iterator position)
|
||||
{
|
||||
return iterator(base.erase(get(position)));
|
||||
}
|
||||
|
||||
const_iterator erase(const_iterator position)
|
||||
{
|
||||
return const_iterator(base.erase(get(position)));
|
||||
}
|
||||
|
||||
size_type erase(const key_type& k)
|
||||
{
|
||||
return base.erase(k);
|
||||
}
|
||||
|
||||
iterator erase(iterator first, iterator last)
|
||||
iterator erase(const_iterator first, const_iterator last)
|
||||
{
|
||||
return iterator(base.erase(get(first), get(last)));
|
||||
}
|
||||
|
||||
const_iterator erase(const_iterator first, const_iterator last)
|
||||
{
|
||||
return const_iterator(base.erase(get(first), get(last)));
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
base.clear();
|
||||
@ -477,47 +462,32 @@ namespace boost
|
||||
return iterator(base.insert(obj));
|
||||
}
|
||||
|
||||
iterator insert(iterator hint, const value_type& obj)
|
||||
iterator insert(const_iterator hint, const value_type& obj)
|
||||
{
|
||||
return iterator(base.insert(get(hint), obj));
|
||||
}
|
||||
|
||||
const_iterator insert(const_iterator hint, const value_type& obj)
|
||||
{
|
||||
return const_iterator(base.insert(get(hint), obj));
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
void insert(InputIterator first, InputIterator last)
|
||||
{
|
||||
base.insert(first, last);
|
||||
}
|
||||
|
||||
iterator erase(iterator position)
|
||||
iterator erase(const_iterator position)
|
||||
{
|
||||
return iterator(base.erase(get(position)));
|
||||
}
|
||||
|
||||
const_iterator erase(const_iterator position)
|
||||
{
|
||||
return const_iterator(base.erase(get(position)));
|
||||
}
|
||||
|
||||
size_type erase(const key_type& k)
|
||||
{
|
||||
return base.erase(k);
|
||||
}
|
||||
|
||||
iterator erase(iterator first, iterator last)
|
||||
iterator erase(const_iterator first, const_iterator last)
|
||||
{
|
||||
return iterator(base.erase(get(first), get(last)));
|
||||
}
|
||||
|
||||
const_iterator erase(const_iterator first, const_iterator last)
|
||||
{
|
||||
return const_iterator(base.erase(get(first), get(last)));
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
base.clear();
|
||||
|
Reference in New Issue
Block a user