Unordered: Move the implementation into a namespace.

Although it typically won't prevent ADL, because of boost::hash.

[SVN r72391]
This commit is contained in:
Daniel James
2011-06-04 16:17:07 +00:00
parent 4777eaf367
commit 20e923ba0d
13 changed files with 129 additions and 132 deletions

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
// Copyright (C) 2005-2009 Daniel James.
// Copyright (C) 2005-2011 Daniel James.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -37,6 +37,8 @@
#endif
namespace boost
{
namespace unordered
{
template <class T, class H, class P, class A>
class unordered_set
@@ -90,12 +92,6 @@ namespace boost
#endif
table table_;
BOOST_DEDUCED_TYPENAME types::node_ptr const&
get(const_iterator const& it)
{
return ::boost::unordered::detail::iterator_access::get(it);
}
public:
@@ -402,12 +398,6 @@ namespace boost
#endif
table table_;
BOOST_DEDUCED_TYPENAME types::node_ptr const&
get(const_iterator const& it)
{
return ::boost::unordered::detail::iterator_access::get(it);
}
public:
@@ -919,7 +909,7 @@ namespace boost
BOOST_DEDUCED_TYPENAME unordered_set<T,H,P,A>::iterator
unordered_set<T,H,P,A>::erase(const_iterator position)
{
return iterator(table_.erase(get(position)));
return iterator(table_.erase(position.node_));
}
template <class T, class H, class P, class A>
@@ -933,7 +923,7 @@ namespace boost
BOOST_DEDUCED_TYPENAME unordered_set<T,H,P,A>::iterator
unordered_set<T,H,P,A>::erase(const_iterator first, const_iterator last)
{
return iterator(table_.erase_range(get(first), get(last)));
return iterator(table_.erase_range(first.node_, last.node_));
}
template <class T, class H, class P, class A>
@@ -1318,7 +1308,7 @@ namespace boost
BOOST_DEDUCED_TYPENAME unordered_multiset<T,H,P,A>::iterator
unordered_multiset<T,H,P,A>::erase(const_iterator position)
{
return iterator(table_.erase(get(position)));
return iterator(table_.erase(position.node_));
}
template <class T, class H, class P, class A>
@@ -1332,7 +1322,7 @@ namespace boost
BOOST_DEDUCED_TYPENAME unordered_multiset<T,H,P,A>::iterator
unordered_multiset<T,H,P,A>::erase(const_iterator first, const_iterator last)
{
return iterator(table_.erase_range(get(first), get(last)));
return iterator(table_.erase_range(first.node_, last.node_));
}
template <class T, class H, class P, class A>
@@ -1461,6 +1451,7 @@ namespace boost
m1.swap(m2);
}
} // namespace unordered
} // namespace boost
#if defined(BOOST_MSVC)