Skip to content

Commit 620adac

Browse files
committed
Revert "[libc++] ADL-proof <vector> by adding _VSTD:: qualification on calls."
This reverts commit 40267cc. Build fails, e.g. http://lab.llvm.org:8011/#/builders/23/builds/108
1 parent a1702a2 commit 620adac

File tree

10 files changed

+22
-59
lines changed

10 files changed

+22
-59
lines changed

libcxx/include/__hash_table

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2728,9 +2728,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
27282728
__u.__bucket_list_.reset(__npp);
27292729
}
27302730
_VSTD::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size());
2731-
_VSTD::__swap_allocator(__bucket_list_.get_deleter().__alloc(),
2731+
__swap_allocator(__bucket_list_.get_deleter().__alloc(),
27322732
__u.__bucket_list_.get_deleter().__alloc());
2733-
_VSTD::__swap_allocator(__node_alloc(), __u.__node_alloc());
2733+
__swap_allocator(__node_alloc(), __u.__node_alloc());
27342734
_VSTD::swap(__p1_.first().__next_, __u.__p1_.first().__next_);
27352735
__p2_.swap(__u.__p2_);
27362736
__p3_.swap(__u.__p3_);

libcxx/include/__split_buffer

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ void
279279
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type)
280280
{
281281
while (__begin_ != __new_begin)
282-
__alloc_traits::destroy(__alloc(), _VSTD::__to_address(__begin_++));
282+
__alloc_traits::destroy(__alloc(), __to_address(__begin_++));
283283
}
284284

285285
template <class _Tp, class _Allocator>
@@ -296,7 +296,7 @@ void
296296
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
297297
{
298298
while (__new_last != __end_)
299-
__alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__end_));
299+
__alloc_traits::destroy(__alloc(), __to_address(--__end_));
300300
}
301301

302302
template <class _Tp, class _Allocator>
@@ -416,7 +416,7 @@ __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
416416
_VSTD::swap(__begin_, __x.__begin_);
417417
_VSTD::swap(__end_, __x.__end_);
418418
_VSTD::swap(__end_cap(), __x.__end_cap());
419-
_VSTD::__swap_allocator(__alloc(), __x.__alloc());
419+
__swap_allocator(__alloc(), __x.__alloc());
420420
}
421421

422422
template <class _Tp, class _Allocator>

libcxx/include/__tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@ __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
18191819
using _VSTD::swap;
18201820
swap(__begin_node_, __t.__begin_node_);
18211821
swap(__pair1_.first(), __t.__pair1_.first());
1822-
_VSTD::__swap_allocator(__node_alloc(), __t.__node_alloc());
1822+
__swap_allocator(__node_alloc(), __t.__node_alloc());
18231823
__pair3_.swap(__t.__pair3_);
18241824
if (size() == 0)
18251825
__begin_node() = __end_node();

libcxx/include/deque

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ __deque_base<_Tp, _Allocator>::swap(__deque_base& __c)
12371237
__map_.swap(__c.__map_);
12381238
_VSTD::swap(__start_, __c.__start_);
12391239
_VSTD::swap(size(), __c.size());
1240-
_VSTD::__swap_allocator(__alloc(), __c.__alloc());
1240+
__swap_allocator(__alloc(), __c.__alloc());
12411241
}
12421242

12431243
template <class _Tp, class _Allocator>
@@ -2376,7 +2376,7 @@ deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l,
23762376
for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
23772377
_ConstructTransaction __tx(this, __br);
23782378
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void)++__f) {
2379-
__alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), *__f);
2379+
__alloc_traits::construct(__a, std::__to_address(__tx.__pos_), *__f);
23802380
}
23812381
}
23822382
}
@@ -2393,7 +2393,7 @@ deque<_Tp, _Allocator>::__append(size_type __n)
23932393
for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
23942394
_ConstructTransaction __tx(this, __br);
23952395
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
2396-
__alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_));
2396+
__alloc_traits::construct(__a, std::__to_address(__tx.__pos_));
23972397
}
23982398
}
23992399
}
@@ -2410,7 +2410,7 @@ deque<_Tp, _Allocator>::__append(size_type __n, const value_type& __v)
24102410
for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
24112411
_ConstructTransaction __tx(this, __br);
24122412
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
2413-
__alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), __v);
2413+
__alloc_traits::construct(__a, std::__to_address(__tx.__pos_), __v);
24142414
}
24152415
}
24162416

@@ -2708,7 +2708,7 @@ void
27082708
deque<_Tp, _Allocator>::pop_front()
27092709
{
27102710
allocator_type& __a = __base::__alloc();
2711-
__alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() +
2711+
__alloc_traits::destroy(__a, __to_address(*(__base::__map_.begin() +
27122712
__base::__start_ / __base::__block_size) +
27132713
__base::__start_ % __base::__block_size));
27142714
--__base::size();
@@ -2723,7 +2723,7 @@ deque<_Tp, _Allocator>::pop_back()
27232723
_LIBCPP_ASSERT(!empty(), "deque::pop_back called for empty deque");
27242724
allocator_type& __a = __base::__alloc();
27252725
size_type __p = __base::size() + __base::__start_ - 1;
2726-
__alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() +
2726+
__alloc_traits::destroy(__a, __to_address(*(__base::__map_.begin() +
27272727
__p / __base::__block_size) +
27282728
__p % __base::__block_size));
27292729
--__base::size();

libcxx/include/forward_list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x)
603603
__is_nothrow_swappable<__node_allocator>::value)
604604
#endif
605605
{
606-
_VSTD::__swap_allocator(__alloc(), __x.__alloc(),
606+
__swap_allocator(__alloc(), __x.__alloc(),
607607
integral_constant<bool, __node_traits::propagate_on_container_swap::value>());
608608
using _VSTD::swap;
609609
swap(__before_begin()->__next_, __x.__before_begin()->__next_);

libcxx/include/list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
783783
"list::swap: Either propagate_on_container_swap must be true"
784784
" or the allocators must compare equal");
785785
using _VSTD::swap;
786-
_VSTD::__swap_allocator(__node_alloc(), __c.__node_alloc());
786+
__swap_allocator(__node_alloc(), __c.__node_alloc());
787787
swap(__sz(), __c.__sz());
788788
swap(__end_, __c.__end_);
789789
if (__sz() == 0)

libcxx/include/memory

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4898,7 +4898,7 @@ void __swap_allocator(_Alloc & __a1, _Alloc & __a2)
48984898
_NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)
48994899
#endif
49004900
{
4901-
_VSTD::__swap_allocator(__a1, __a2,
4901+
__swap_allocator(__a1, __a2,
49024902
integral_constant<bool, _VSTD::allocator_traits<_Alloc>::propagate_on_container_swap::value>());
49034903
}
49044904

libcxx/include/string

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3438,7 +3438,7 @@ basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
34383438
__alloc_traits::is_always_equal::value ||
34393439
__alloc() == __str.__alloc(), "swapping non-equal allocators");
34403440
_VSTD::swap(__r_.first(), __str.__r_.first());
3441-
_VSTD::__swap_allocator(__alloc(), __str.__alloc());
3441+
__swap_allocator(__alloc(), __str.__alloc());
34423442
}
34433443

34443444
// find

libcxx/include/vector

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
951951
{
952952

953953
__annotate_delete();
954-
_VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
954+
__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
955955
_VSTD::swap(this->__begin_, __v.__begin_);
956956
_VSTD::swap(this->__end_, __v.__end_);
957957
_VSTD::swap(this->__end_cap(), __v.__end_cap());
@@ -966,8 +966,8 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
966966
{
967967
__annotate_delete();
968968
pointer __r = __v.__begin_;
969-
_VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, __p, __v.__begin_);
970-
_VSTD::__construct_forward_with_exception_guarantees(this->__alloc(), __p, this->__end_, __v.__end_);
969+
__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, __p, __v.__begin_);
970+
__construct_forward_with_exception_guarantees(this->__alloc(), __p, this->__end_, __v.__end_);
971971
_VSTD::swap(this->__begin_, __v.__begin_);
972972
_VSTD::swap(this->__end_, __v.__end_);
973973
_VSTD::swap(this->__end_cap(), __v.__end_cap());
@@ -1074,7 +1074,7 @@ typename enable_if
10741074
vector<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n)
10751075
{
10761076
_ConstructTransaction __tx(*this, __n);
1077-
_VSTD::__construct_range_forward(this->__alloc(), __first, __last, __tx.__pos_);
1077+
__construct_range_forward(this->__alloc(), __first, __last, __tx.__pos_);
10781078
}
10791079

10801080
// Default constructs __n objects starting at __end_
@@ -2054,7 +2054,7 @@ vector<_Tp, _Allocator>::swap(vector& __x)
20542054
_VSTD::swap(this->__begin_, __x.__begin_);
20552055
_VSTD::swap(this->__end_, __x.__end_);
20562056
_VSTD::swap(this->__end_cap(), __x.__end_cap());
2057-
_VSTD::__swap_allocator(this->__alloc(), __x.__alloc(),
2057+
__swap_allocator(this->__alloc(), __x.__alloc(),
20582058
integral_constant<bool,__alloc_traits::propagate_on_container_swap::value>());
20592059
#if _LIBCPP_DEBUG_LEVEL == 2
20602060
__get_db()->swap(this, &__x);
@@ -3232,7 +3232,7 @@ vector<bool, _Allocator>::swap(vector& __x)
32323232
_VSTD::swap(this->__begin_, __x.__begin_);
32333233
_VSTD::swap(this->__size_, __x.__size_);
32343234
_VSTD::swap(this->__cap(), __x.__cap());
3235-
_VSTD::__swap_allocator(this->__alloc(), __x.__alloc(),
3235+
__swap_allocator(this->__alloc(), __x.__alloc(),
32363236
integral_constant<bool, __alloc_traits::propagate_on_container_swap::value>());
32373237
}
32383238

libcxx/test/libcxx/containers/sequences/vector/robust_against_adl.pass.cpp

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)