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:
Daniel James
2007-10-11 23:49:31 +00:00
parent 2cdb800ec3
commit 50c629dcb0
4 changed files with 26 additions and 68 deletions

View File

@ -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();