Qualify calls to addressof with std::. Bug 9106
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124726 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/deque b/include/deque
index 9bf301c..a704d4e 100644
--- a/include/deque
+++ b/include/deque
@@ -1116,7 +1116,7 @@
{
allocator_type& __a = __alloc();
for (iterator __i = begin(), __e = end(); __i != __e; ++__i)
- __alloc_traits::destroy(__a, addressof(*__i));
+ __alloc_traits::destroy(__a, _STD::addressof(*__i));
size() = 0;
while (__map_.size() > 2)
{
@@ -1675,7 +1675,7 @@
if (__back_spare() == 0)
__add_back_capacity();
// __back_spare() >= 1
- __alloc_traits::construct(__a, addressof(*__base::end()), __v);
+ __alloc_traits::construct(__a, _STD::addressof(*__base::end()), __v);
++__base::size();
}
@@ -1689,7 +1689,7 @@
if (__back_spare() == 0)
__add_back_capacity();
// __back_spare() >= 1
- __alloc_traits::construct(__a, addressof(*__base::end()), _STD::move(__v));
+ __alloc_traits::construct(__a, _STD::addressof(*__base::end()), _STD::move(__v));
++__base::size();
}
@@ -1704,7 +1704,7 @@
if (__back_spare() == 0)
__add_back_capacity();
// __back_spare() >= 1
- __alloc_traits::construct(__a, addressof(*__base::end()), _STD::forward<_Args>(__args)...);
+ __alloc_traits::construct(__a, _STD::addressof(*__base::end()), _STD::forward<_Args>(__args)...);
++__base::size();
}
@@ -1719,7 +1719,7 @@
if (__front_spare() == 0)
__add_front_capacity();
// __front_spare() >= 1
- __alloc_traits::construct(__a, addressof(*--__base::begin()), __v);
+ __alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), __v);
--__base::__start_;
++__base::size();
}
@@ -1734,7 +1734,7 @@
if (__front_spare() == 0)
__add_front_capacity();
// __front_spare() >= 1
- __alloc_traits::construct(__a, addressof(*--__base::begin()), _STD::move(__v));
+ __alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), _STD::move(__v));
--__base::__start_;
++__base::size();
}
@@ -1750,7 +1750,7 @@
if (__front_spare() == 0)
__add_front_capacity();
// __front_spare() >= 1
- __alloc_traits::construct(__a, addressof(*--__base::begin()), _STD::forward<_Args>(__args)...);
+ __alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), _STD::forward<_Args>(__args)...);
--__base::__start_;
++__base::size();
}
@@ -1772,7 +1772,7 @@
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, addressof(*--__base::begin()), __v);
+ __alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), __v);
--__base::__start_;
++__base::size();
}
@@ -1783,7 +1783,7 @@
iterator __bm1 = prev(__b);
if (__vt == pointer_traits<const_pointer>::pointer_to(*__b))
__vt = pointer_traits<const_pointer>::pointer_to(*__bm1);
- __alloc_traits::construct(__a, addressof(*__bm1), _STD::move(*__b));
+ __alloc_traits::construct(__a, _STD::addressof(*__bm1), _STD::move(*__b));
--__base::__start_;
++__base::size();
if (__pos > 1)
@@ -1799,7 +1799,7 @@
size_type __de = __base::size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, addressof(*__base::end()), __v);
+ __alloc_traits::construct(__a, _STD::addressof(*__base::end()), __v);
++__base::size();
}
else
@@ -1809,7 +1809,7 @@
iterator __em1 = prev(__e);
if (__vt == pointer_traits<const_pointer>::pointer_to(*__em1))
__vt = pointer_traits<const_pointer>::pointer_to(*__e);
- __alloc_traits::construct(__a, addressof(*__e), _STD::move(*__em1));
+ __alloc_traits::construct(__a, _STD::addressof(*__e), _STD::move(*__em1));
++__base::size();
if (__de > 1)
__e = __move_backward_and_check(__e - __de, __em1, __e, __vt);
@@ -1835,7 +1835,7 @@
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, addressof(*--__base::begin()), _STD::move(__v));
+ __alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), _STD::move(__v));
--__base::__start_;
++__base::size();
}
@@ -1843,7 +1843,7 @@
{
iterator __b = __base::begin();
iterator __bm1 = prev(__b);
- __alloc_traits::construct(__a, addressof(*__bm1), _STD::move(*__b));
+ __alloc_traits::construct(__a, _STD::addressof(*__bm1), _STD::move(*__b));
--__base::__start_;
++__base::size();
if (__pos > 1)
@@ -1859,14 +1859,14 @@
size_type __de = __base::size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, addressof(*__base::end()), _STD::move(__v));
+ __alloc_traits::construct(__a, _STD::addressof(*__base::end()), _STD::move(__v));
++__base::size();
}
else
{
iterator __e = __base::end();
iterator __em1 = prev(__e);
- __alloc_traits::construct(__a, addressof(*__e), _STD::move(*__em1));
+ __alloc_traits::construct(__a, _STD::addressof(*__e), _STD::move(*__em1));
++__base::size();
if (__de > 1)
__e = _STD::move_backward(__e - __de, __em1, __e);
@@ -1893,7 +1893,7 @@
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, addressof(*--__base::begin()), _STD::forward<_Args>(__args)...);
+ __alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), _STD::forward<_Args>(__args)...);
--__base::__start_;
++__base::size();
}
@@ -1901,7 +1901,7 @@
{
iterator __b = __base::begin();
iterator __bm1 = prev(__b);
- __alloc_traits::construct(__a, addressof(*__bm1), _STD::move(*__b));
+ __alloc_traits::construct(__a, _STD::addressof(*__bm1), _STD::move(*__b));
--__base::__start_;
++__base::size();
if (__pos > 1)
@@ -1917,14 +1917,14 @@
size_type __de = __base::size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, addressof(*__base::end()), _STD::forward<_Args>(__args)...);
+ __alloc_traits::construct(__a, _STD::addressof(*__base::end()), _STD::forward<_Args>(__args)...);
++__base::size();
}
else
{
iterator __e = __base::end();
iterator __em1 = prev(__e);
- __alloc_traits::construct(__a, addressof(*__e), _STD::move(*__em1));
+ __alloc_traits::construct(__a, _STD::addressof(*__e), _STD::move(*__em1));
++__base::size();
if (__de > 1)
__e = _STD::move_backward(__e - __de, __em1, __e);
@@ -1955,7 +1955,7 @@
if (__n > __pos)
{
for (size_type __m = __n - __pos; __m; --__m, --__base::__start_, ++__base::size())
- __alloc_traits::construct(__a, addressof(*--__i), __v);
+ __alloc_traits::construct(__a, _STD::addressof(*--__i), __v);
__n = __pos;
}
if (__n > 0)
@@ -1981,7 +1981,7 @@
if (__n > __de)
{
for (size_type __m = __n - __de; __m; --__m, ++__i, ++__base::size())
- __alloc_traits::construct(__a, addressof(*__i), __v);
+ __alloc_traits::construct(__a, _STD::addressof(*__i), __v);
__n = __de;
}
if (__n > 0)
@@ -2033,7 +2033,7 @@
{
__m = __pos < __n / 2 ? _STD::prev(__l, __pos) : _STD::next(__f, __n - __pos);
for (_BiIter __j = __m; __j != __f; --__base::__start_, ++__base::size())
- __alloc_traits::construct(__a, addressof(*--__i), *--__j);
+ __alloc_traits::construct(__a, _STD::addressof(*--__i), *--__j);
__n = __pos;
}
if (__n > 0)
@@ -2041,7 +2041,7 @@
iterator __obn = __old_begin + __n;
for (iterator __j = __obn; __j != __old_begin;)
{
- __alloc_traits::construct(__a, addressof(*--__i), _STD::move(*--__j));
+ __alloc_traits::construct(__a, _STD::addressof(*--__i), _STD::move(*--__j));
--__base::__start_;
++__base::size();
}
@@ -2065,14 +2065,14 @@
{
__m = __de < __n / 2 ? _STD::next(__f, __de) : _STD::prev(__l, __n - __de);
for (_BiIter __j = __m; __j != __l; ++__i, ++__j, ++__base::size())
- __alloc_traits::construct(__a, addressof(*__i), *__j);
+ __alloc_traits::construct(__a, _STD::addressof(*__i), *__j);
__n = __de;
}
if (__n > 0)
{
iterator __oen = __old_end - __n;
for (iterator __j = __oen; __j != __old_end; ++__i, ++__j, ++__base::size())
- __alloc_traits::construct(__a, addressof(*__i), _STD::move(*__j));
+ __alloc_traits::construct(__a, _STD::addressof(*__i), _STD::move(*__j));
if (__n < __de)
__old_end = _STD::move_backward(__old_end - __de, __oen, __old_end);
_STD::copy_backward(__f, __m, __old_end);
@@ -2105,7 +2105,7 @@
__add_back_capacity(__n - __back_capacity);
// __n <= __back_capacity
for (iterator __i = __base::end(); __f != __l; ++__i, ++__f, ++__base::size())
- __alloc_traits::construct(__a, addressof(*__i), *__f);
+ __alloc_traits::construct(__a, _STD::addressof(*__i), *__f);
}
template <class _Tp, class _Allocator>
@@ -2118,7 +2118,7 @@
__add_back_capacity(__n - __back_capacity);
// __n <= __back_capacity
for (iterator __i = __base::end(); __n; --__n, ++__i, ++__base::size())
- __alloc_traits::construct(__a, addressof(*__i));
+ __alloc_traits::construct(__a, _STD::addressof(*__i));
}
template <class _Tp, class _Allocator>
@@ -2131,7 +2131,7 @@
__add_back_capacity(__n - __back_capacity);
// __n <= __back_capacity
for (iterator __i = __base::end(); __n; --__n, ++__i, ++__base::size())
- __alloc_traits::construct(__a, addressof(*__i), __v);
+ __alloc_traits::construct(__a, _STD::addressof(*__i), __v);
}
// Create front capacity for one block of elements.
@@ -2536,7 +2536,7 @@
allocator_type& __a = __base::__alloc();
// as if
// for (; __f != __l; ++__r, ++__f, ++__base::size())
- // __alloc_traits::construct(__a, addressof(*__r), _STD::move(*__f));
+ // __alloc_traits::construct(__a, _STD::addressof(*__r), _STD::move(*__f));
difference_type __n = __l - __f;
while (__n > 0)
{
@@ -2551,7 +2551,7 @@
if (__fb <= __vt && __vt < __fe)
__vt = (const_iterator(__f.__m_iter_, __vt) += __r - __f).__ptr_;
for (; __fb != __fe; ++__fb, ++__r, ++__base::size())
- __alloc_traits::construct(__a, addressof(*__r), _STD::move(*__fb));
+ __alloc_traits::construct(__a, _STD::addressof(*__r), _STD::move(*__fb));
__n -= __bs;
__f += __bs;
}
@@ -2568,7 +2568,7 @@
// as if
// for (iterator __j = __l; __j != __f;)
// {
- // __alloc_traitsconstruct(__a, addressof(*--__r), _STD::move(*--__j));
+ // __alloc_traitsconstruct(__a, _STD::addressof(*--__r), _STD::move(*--__j));
// --__base::__start_;
// ++__base::size();
// }
@@ -2588,7 +2588,7 @@
__vt = (const_iterator(__l.__m_iter_, __vt) -= __l - __r + 1).__ptr_;
while (__le != __lb)
{
- __alloc_traits::construct(__a, addressof(*--__r), _STD::move(*--__le));
+ __alloc_traits::construct(__a, _STD::addressof(*--__r), _STD::move(*--__le));
--__base::__start_;
++__base::size();
}
@@ -2609,7 +2609,7 @@
if (__pos < (__base::size() - 1) / 2)
{ // erase from front
_STD::move_backward(__b, __p, next(__p));
- __alloc_traits::destroy(__a, addressof(*__b));
+ __alloc_traits::destroy(__a, _STD::addressof(*__b));
--__base::size();
++__base::__start_;
if (__front_spare() >= 2 * __base::__block_size)
@@ -2622,7 +2622,7 @@
else
{ // erase from back
iterator __i = _STD::move(next(__p), __base::end(), __p);
- __alloc_traits::destroy(__a, addressof(*__i));
+ __alloc_traits::destroy(__a, _STD::addressof(*__i));
--__base::size();
if (__back_spare() >= 2 * __base::__block_size)
{
@@ -2648,7 +2648,7 @@
{ // erase from front
iterator __i = _STD::move_backward(__b, __p, __p + __n);
for (; __b != __i; ++__b)
- __alloc_traits::destroy(__a, addressof(*__b));
+ __alloc_traits::destroy(__a, _STD::addressof(*__b));
__base::size() -= __n;
__base::__start_ += __n;
while (__front_spare() >= 2 * __base::__block_size)
@@ -2662,7 +2662,7 @@
{ // erase from back
iterator __i = _STD::move(__p + __n, __base::end(), __p);
for (iterator __e = __base::end(); __i != __e; ++__i)
- __alloc_traits::destroy(__a, addressof(*__i));
+ __alloc_traits::destroy(__a, _STD::addressof(*__i));
__base::size() -= __n;
while (__back_spare() >= 2 * __base::__block_size)
{
@@ -2686,7 +2686,7 @@
iterator __b = __base::begin();
difference_type __pos = __f - __b;
for (iterator __p = __b + __pos; __p != __e; ++__p)
- __alloc_traits::destroy(__a, addressof(*__p));
+ __alloc_traits::destroy(__a, _STD::addressof(*__p));
__base::size() -= __n;
while (__back_spare() >= 2 * __base::__block_size)
{