forked from boostorg/unordered
Unordered: Qualify calls to addressof.
Hopefully this will fix C++0x compilers. Although I don't have one at hand to test. [SVN r73690]
This commit is contained in:
@ -49,9 +49,6 @@ namespace boost { namespace unordered { namespace detail {
|
||||
|
||||
// TODO: Use std::addressof if available?
|
||||
#include <boost/utility/addressof.hpp>
|
||||
namespace boost { namespace unordered { namespace detail {
|
||||
using boost::addressof;
|
||||
}}}
|
||||
|
||||
namespace boost { namespace unordered { namespace detail {
|
||||
|
||||
@ -241,7 +238,8 @@ namespace boost { namespace unordered { namespace detail {
|
||||
~allocator_array_constructor() {
|
||||
if (ptr_) {
|
||||
for(pointer p = ptr_; p != constructed_; ++p)
|
||||
allocator_traits<Allocator>::destroy(alloc_, addressof(*p));
|
||||
allocator_traits<Allocator>::destroy(alloc_,
|
||||
boost::addressof(*p));
|
||||
|
||||
allocator_traits<Allocator>::deallocate(alloc_, ptr_, length_);
|
||||
}
|
||||
@ -255,7 +253,8 @@ namespace boost { namespace unordered { namespace detail {
|
||||
ptr_ = allocator_traits<Allocator>::allocate(alloc_, length_);
|
||||
pointer end = ptr_ + static_cast<std::ptrdiff_t>(length_);
|
||||
for(constructed_ = ptr_; constructed_ != end; ++constructed_)
|
||||
allocator_traits<Allocator>::construct(alloc_, addressof(*constructed_), v);
|
||||
allocator_traits<Allocator>::construct(alloc_,
|
||||
boost::addressof(*constructed_), v);
|
||||
}
|
||||
|
||||
pointer get() const
|
||||
|
@ -195,7 +195,7 @@ namespace boost { namespace unordered { namespace detail {
|
||||
|
||||
void delete_node(node_ptr n)
|
||||
{
|
||||
node* raw_ptr = static_cast<node*>(addressof(*n));
|
||||
node* raw_ptr = static_cast<node*>(boost::addressof(*n));
|
||||
real_node_ptr real_ptr(node_alloc().address(*raw_ptr));
|
||||
|
||||
::boost::unordered::detail::destroy(raw_ptr->value_ptr());
|
||||
@ -217,7 +217,8 @@ namespace boost { namespace unordered { namespace detail {
|
||||
|
||||
++end;
|
||||
for(bucket_ptr begin = this->buckets_; begin != end; ++begin) {
|
||||
allocator_traits<bucket_allocator>::destroy(bucket_alloc(), addressof(*begin));
|
||||
allocator_traits<bucket_allocator>::destroy(bucket_alloc(),
|
||||
boost::addressof(*begin));
|
||||
}
|
||||
|
||||
allocator_traits<bucket_allocator>::deallocate(bucket_alloc(), this->buckets_, this->bucket_count_ + 1);
|
||||
@ -586,7 +587,8 @@ namespace boost { namespace unordered { namespace detail {
|
||||
}
|
||||
|
||||
if (node_constructed_)
|
||||
allocator_traits<node_allocator>::destroy(buckets_.node_alloc(), addressof(*node_));
|
||||
allocator_traits<node_allocator>::destroy(buckets_.node_alloc(),
|
||||
boost::addressof(*node_));
|
||||
|
||||
allocator_traits<node_allocator>::deallocate(buckets_.node_alloc(), node_, 1);
|
||||
}
|
||||
@ -600,7 +602,8 @@ namespace boost { namespace unordered { namespace detail {
|
||||
value_constructed_ = false;
|
||||
|
||||
node_ = allocator_traits<node_allocator>::allocate(buckets_.node_alloc(), 1);
|
||||
allocator_traits<node_allocator>::construct(buckets_.node_alloc(), addressof(*node_), node());
|
||||
allocator_traits<node_allocator>::construct(buckets_.node_alloc(),
|
||||
boost::addressof(*node_), node());
|
||||
node_->init(buckets_.bucket_alloc().address(*node_));
|
||||
|
||||
node_constructed_ = true;
|
||||
|
Reference in New Issue
Block a user