Update the unordered containers' iterator overloads for the more recent versions of TR1.

[SVN r2921]
This commit is contained in:
Daniel James
2006-04-17 08:45:32 +00:00
parent 56e67a9d7d
commit e8faab1268
2 changed files with 50 additions and 85 deletions

View File

@ -5,7 +5,7 @@
// boost/unordered_map.hpp
// Copyright <20> 2003-2004 Jeremy B. Maitin-Shepard.
// Copyright <20> 2005 Daniel James.
// Copyright <20> 2005-2006 Daniel James.
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
@ -186,32 +186,47 @@ namespace boost
base.insert_unique(obj));
}
iterator insert(const_iterator hint, const value_type& obj)
iterator insert(iterator hint, const value_type& obj)
{
return iterator(base.insert_unique(get(hint), obj));
}
const_iterator insert(const_iterator hint, const value_type& obj)
{
return const_iterator(base.insert_unique(get(hint), obj));
}
template <class InputIterator>
void insert(InputIterator first, InputIterator last)
{
base.insert(first, last);
}
iterator erase(const_iterator position)
iterator erase(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(const_iterator first, const_iterator last)
iterator erase(iterator first, 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();
@ -473,32 +488,47 @@ namespace boost
return iterator(base.insert_equivalent(obj));
}
iterator insert(const_iterator hint, const value_type& obj)
iterator insert(iterator hint, const value_type& obj)
{
return iterator(base.insert_equivalent(get(hint), obj));
}
const_iterator insert(const_iterator hint, const value_type& obj)
{
return const_iterator(base.insert_equivalent(get(hint), obj));
}
template <class InputIterator>
void insert(InputIterator first, InputIterator last)
{
base.insert(first, last);
}
iterator erase(const_iterator position)
iterator erase(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(const_iterator first, const_iterator last)
iterator erase(iterator first, 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();