|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2007-12-20 14:12:55
Author: danieljames
Date: 2007-12-20 14:12:55 EST (Thu, 20 Dec 2007)
New Revision: 42206
URL: http://svn.boost.org/trac/boost/changeset/42206
Log:
Make some of the changes suggested by Steve Watanabe.
Explicitly use unordered_detail namespace to avoid ADL.
Only clear buckets starting with cached_begin_bucket_ in clear.
Use BOOST_DEDUCED_TYPENAME more consistently.
Text files modified:
branches/unordered/trunk/boost/unordered/detail/allocator.hpp | 20 ++++++++++----------
branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp | 16 ++++++++--------
2 files changed, 18 insertions(+), 18 deletions(-)
Modified: branches/unordered/trunk/boost/unordered/detail/allocator.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered/detail/allocator.hpp (original)
+++ branches/unordered/trunk/boost/unordered/detail/allocator.hpp 2007-12-20 14:12:55 EST (Thu, 20 Dec 2007)
@@ -61,27 +61,27 @@
template <class Allocator> struct allocator_value_type
{
- typedef typename Allocator::value_type type;
+ typedef BOOST_DEDUCED_TYPENAME Allocator::value_type type;
};
template <class Allocator> struct allocator_pointer
{
- typedef typename Allocator::pointer type;
+ typedef BOOST_DEDUCED_TYPENAME Allocator::pointer type;
};
template <class Allocator> struct allocator_const_pointer
{
- typedef typename Allocator::const_pointer type;
+ typedef BOOST_DEDUCED_TYPENAME Allocator::const_pointer type;
};
template <class Allocator> struct allocator_reference
{
- typedef typename Allocator::reference type;
+ typedef BOOST_DEDUCED_TYPENAME Allocator::reference type;
};
template <class Allocator> struct allocator_const_reference
{
- typedef typename Allocator::const_reference type;
+ typedef BOOST_DEDUCED_TYPENAME Allocator::const_reference type;
};
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
@@ -121,8 +121,8 @@
template <class Allocator>
struct allocator_constructor
{
- typedef typename Allocator::value_type value_type;
- typedef typename allocator_pointer<Allocator>::type pointer;
+ typedef BOOST_DEDUCED_TYPENAME allocator_value_type<Allocator>::type value_type;
+ typedef BOOST_DEDUCED_TYPENAME allocator_pointer<Allocator>::type pointer;
Allocator& alloc_;
pointer ptr_;
@@ -168,7 +168,7 @@
{
pointer p = ptr_;
constructed_ = false;
- reset(ptr_);
+ unordered_detail::reset(ptr_);
return p;
}
};
@@ -176,7 +176,7 @@
template <class Allocator>
struct allocator_array_constructor
{
- typedef typename allocator_pointer<Allocator>::type pointer;
+ typedef BOOST_DEDUCED_TYPENAME allocator_pointer<Allocator>::type pointer;
Allocator& alloc_;
pointer ptr_;
@@ -220,7 +220,7 @@
pointer release()
{
pointer p(ptr_);
- reset(ptr_);
+ unordered_detail::reset(ptr_);
return p;
}
private:
Modified: branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp (original)
+++ branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp 2007-12-20 14:12:55 EST (Thu, 20 Dec 2007)
@@ -154,10 +154,10 @@
void swap(allocators& x)
{
- hash_swap(node_alloc_, x.node_alloc_);
- hash_swap(bucket_alloc_, x.bucket_alloc_);
- hash_swap(value_alloc_, x.value_alloc_);
- hash_swap(node_base_alloc_, x.node_base_alloc_);
+ unordered_detail::hash_swap(node_alloc_, x.node_alloc_);
+ unordered_detail::hash_swap(bucket_alloc_, x.bucket_alloc_);
+ unordered_detail::hash_swap(value_alloc_, x.value_alloc_);
+ unordered_detail::hash_swap(node_base_alloc_, x.node_base_alloc_);
}
bool operator==(allocators const& x)
@@ -831,7 +831,7 @@
void clear()
{
- bucket_ptr begin = buckets_;
+ bucket_ptr begin = cached_begin_bucket_;
bucket_ptr end = buckets_ + bucket_count_;
size_ = 0;
@@ -969,9 +969,9 @@
{
typedef BOOST_UNORDERED_TABLE_DATA<Alloc> data;
- typedef typename data::node_constructor node_constructor;
- typedef typename data::bucket_ptr bucket_ptr;
- typedef typename data::link_ptr link_ptr;
+ typedef BOOST_DEDUCED_TYPENAME data::node_constructor node_constructor;
+ typedef BOOST_DEDUCED_TYPENAME data::bucket_ptr bucket_ptr;
+ typedef BOOST_DEDUCED_TYPENAME data::link_ptr link_ptr;
public:
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk