Skip to content

Commit 6491d99

Browse files
committed
[libc++] Remove more unnecessary _VSTD:: from type names. NFCI.
Differential Revision: https://reviews.llvm.org/D102181
1 parent 866b279 commit 6491d99

File tree

8 files changed

+33
-35
lines changed

8 files changed

+33
-35
lines changed

libcxx/include/__memory/allocator_traits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ template <class _Tp>
362362
struct __is_default_allocator : false_type { };
363363

364364
template <class _Tp>
365-
struct __is_default_allocator<_VSTD::allocator<_Tp> > : true_type { };
365+
struct __is_default_allocator<allocator<_Tp> > : true_type { };
366366

367367
// __is_cpp17_move_insertable
368368
template <class _Alloc, class = void>

libcxx/include/algorithm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,7 +3195,7 @@ _SampleIterator __sample(_PopulationIterator __first,
31953195
__output_iter[__k] = *__first;
31963196
_Distance __sz = __k;
31973197
for (; __first != __last; ++__first, (void) ++__k) {
3198-
_Distance __r = _VSTD::uniform_int_distribution<_Distance>(0, __k)(__g);
3198+
_Distance __r = uniform_int_distribution<_Distance>(0, __k)(__g);
31993199
if (__r < __sz)
32003200
__output_iter[__r] = *__first;
32013201
}
@@ -3212,8 +3212,7 @@ _SampleIterator __sample(_PopulationIterator __first,
32123212
forward_iterator_tag) {
32133213
_Distance __unsampled_sz = _VSTD::distance(__first, __last);
32143214
for (__n = _VSTD::min(__n, __unsampled_sz); __n != 0; ++__first) {
3215-
_Distance __r =
3216-
_VSTD::uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g);
3215+
_Distance __r = uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g);
32173216
if (__r < __n) {
32183217
*__output_iter++ = *__first;
32193218
--__n;
@@ -4914,7 +4913,7 @@ template <class _RandomAccessIterator, class _Compare>
49144913
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
49154914
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
49164915
{
4917-
typedef typename _VSTD::iterator_traits<_RandomAccessIterator>::difference_type difference_type;
4916+
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
49184917
difference_type __len = __last - __first;
49194918
difference_type __p = 0;
49204919
difference_type __c = 1;

libcxx/include/experimental/functional

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ public:
122122
operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
123123
{
124124
return _VSTD::__search(__f, __l, __first_, __last_, __pred_,
125-
typename _VSTD::iterator_traits<_ForwardIterator>::iterator_category(),
126-
typename _VSTD::iterator_traits<_ForwardIterator2>::iterator_category());
125+
typename iterator_traits<_ForwardIterator>::iterator_category(),
126+
typename iterator_traits<_ForwardIterator2>::iterator_category());
127127
}
128128

129129
private:
@@ -212,7 +212,7 @@ private:
212212
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
213213
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
214214
typedef _BMSkipTable<value_type, difference_type, _Hash, _BinaryPredicate,
215-
_VSTD::is_integral<value_type>::value && // what about enums?
215+
is_integral<value_type>::value && // what about enums?
216216
sizeof(value_type) == 1 &&
217217
is_same<_Hash, hash<value_type>>::value &&
218218
is_same<_BinaryPredicate, equal_to<>>::value
@@ -247,7 +247,7 @@ public:
247247
if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
248248

249249
// If the pattern is larger than the corpus, we can't find it!
250-
if ( __pattern_length_ > _VSTD::distance (__f, __l))
250+
if ( __pattern_length_ > _VSTD::distance(__f, __l))
251251
return make_pair(__l, __l);
252252

253253
// Do the search
@@ -321,13 +321,13 @@ public: // TODO private:
321321
vector<difference_type> & __suffix = *__suffix_.get();
322322
if (__count > 0)
323323
{
324-
_VSTD::vector<value_type> __scratch(__count);
324+
vector<value_type> __scratch(__count);
325325

326326
__compute_bm_prefix(__f, __l, __pred, __scratch);
327327
for ( size_t __i = 0; __i <= __count; __i++ )
328328
__suffix[__i] = __count - __scratch[__count-1];
329329

330-
typedef _VSTD::reverse_iterator<_RandomAccessIterator1> _RevIter;
330+
typedef reverse_iterator<_RandomAccessIterator1> _RevIter;
331331
__compute_bm_prefix(_RevIter(__l), _RevIter(__f), __pred, __scratch);
332332

333333
for ( size_t __i = 0; __i < __count; __i++ )
@@ -363,7 +363,7 @@ private:
363363
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
364364
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
365365
typedef _BMSkipTable<value_type, difference_type, _Hash, _BinaryPredicate,
366-
_VSTD::is_integral<value_type>::value && // what about enums?
366+
is_integral<value_type>::value && // what about enums?
367367
sizeof(value_type) == 1 &&
368368
is_same<_Hash, hash<value_type>>::value &&
369369
is_same<_BinaryPredicate, equal_to<>>::value
@@ -399,7 +399,7 @@ public:
399399
if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
400400

401401
// If the pattern is larger than the corpus, we can't find it!
402-
if ( __pattern_length_ > _VSTD::distance (__f, __l))
402+
if ( __pattern_length_ > _VSTD::distance(__f, __l))
403403
return make_pair(__l, __l);
404404

405405
// Do the search

libcxx/include/experimental/type_traits

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ using raw_invocation_type_t = typename raw_invocation_type<_Tp>::type;
105105
// 3.3.4, Detection idiom
106106
template <class...> using void_t = void;
107107

108-
struct nonesuch : private _VSTD::__nat { // make nonesuch "not an aggregate"
108+
struct nonesuch : private __nat { // make nonesuch "not an aggregate"
109109
~nonesuch() = delete;
110110
nonesuch (nonesuch const&) = delete;
111111
void operator=(nonesuch const&) = delete;

libcxx/include/functional

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,11 +1962,11 @@ union __policy_storage
19621962
// True if _Fun can safely be held in __policy_storage.__small.
19631963
template <typename _Fun>
19641964
struct __use_small_storage
1965-
: public _VSTD::integral_constant<
1965+
: public integral_constant<
19661966
bool, sizeof(_Fun) <= sizeof(__policy_storage) &&
19671967
_LIBCPP_ALIGNOF(_Fun) <= _LIBCPP_ALIGNOF(__policy_storage) &&
1968-
_VSTD::is_trivially_copy_constructible<_Fun>::value &&
1969-
_VSTD::is_trivially_destructible<_Fun>::value> {};
1968+
is_trivially_copy_constructible<_Fun>::value &&
1969+
is_trivially_destructible<_Fun>::value> {};
19701970

19711971
// Policy contains information about how to copy, destroy, and move the
19721972
// underlying functor. You can think of it as a vtable of sorts.
@@ -3190,8 +3190,8 @@ public:
31903190
operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
31913191
{
31923192
return _VSTD::__search(__f, __l, __first_, __last_, __pred_,
3193-
typename _VSTD::iterator_traits<_ForwardIterator>::iterator_category(),
3194-
typename _VSTD::iterator_traits<_ForwardIterator2>::iterator_category());
3193+
typename iterator_traits<_ForwardIterator>::iterator_category(),
3194+
typename iterator_traits<_ForwardIterator2>::iterator_category());
31953195
}
31963196

31973197
private:

libcxx/include/memory

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ void __swap_allocator(_Alloc & __a1, _Alloc & __a2)
863863
#endif
864864
{
865865
_VSTD::__swap_allocator(__a1, __a2,
866-
integral_constant<bool, _VSTD::allocator_traits<_Alloc>::propagate_on_container_swap::value>());
866+
integral_constant<bool, allocator_traits<_Alloc>::propagate_on_container_swap::value>());
867867
}
868868

869869
template <typename _Alloc, typename _Traits=allocator_traits<_Alloc> >

libcxx/include/random

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6292,8 +6292,7 @@ discrete_distribution<_IntType>::param_type::__init()
62926292
if (__p_.size() > 1)
62936293
{
62946294
double __s = _VSTD::accumulate(__p_.begin(), __p_.end(), 0.0);
6295-
for (_VSTD::vector<double>::iterator __i = __p_.begin(), __e = __p_.end();
6296-
__i < __e; ++__i)
6295+
for (vector<double>::iterator __i = __p_.begin(), __e = __p_.end(); __i < __e; ++__i)
62976296
*__i /= __s;
62986297
vector<double> __t(__p_.size() - 1);
62996298
_VSTD::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin());
@@ -6312,7 +6311,7 @@ vector<double>
63126311
discrete_distribution<_IntType>::param_type::probabilities() const
63136312
{
63146313
size_t __n = __p_.size();
6315-
_VSTD::vector<double> __p(__n+1);
6314+
vector<double> __p(__n+1);
63166315
_VSTD::adjacent_difference(__p_.begin(), __p_.end(), __p.begin());
63176316
if (__n > 0)
63186317
__p[__n] = 1 - __p_[__n-1];

libcxx/include/type_traits

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ using _IsSame = _BoolConstant<
580580
#ifdef __clang__
581581
__is_same(_Tp, _Up)
582582
#else
583-
_VSTD::is_same<_Tp, _Up>::value
583+
is_same<_Tp, _Up>::value
584584
#endif
585585
>;
586586

@@ -589,7 +589,7 @@ using _IsNotSame = _BoolConstant<
589589
#ifdef __clang__
590590
!__is_same(_Tp, _Up)
591591
#else
592-
!_VSTD::is_same<_Tp, _Up>::value
592+
!is_same<_Tp, _Up>::value
593593
#endif
594594
>;
595595

@@ -1344,7 +1344,7 @@ template <class _Tp> _Tp __declval(long);
13441344
_LIBCPP_SUPPRESS_DEPRECATED_POP
13451345

13461346
template <class _Tp>
1347-
decltype(_VSTD::__declval<_Tp>(0))
1347+
decltype(__declval<_Tp>(0))
13481348
declval() _NOEXCEPT;
13491349

13501350
// __uncvref
@@ -1712,7 +1712,7 @@ struct __is_convertible_test : public false_type {};
17121712

17131713
template <class _From, class _To>
17141714
struct __is_convertible_test<_From, _To,
1715-
decltype(_VSTD::__is_convertible_imp::__test_convert<_To>(declval<_From>()))> : public true_type
1715+
decltype(__is_convertible_imp::__test_convert<_To>(declval<_From>()))> : public true_type
17161716
{};
17171717

17181718
template <class _Tp, bool _IsArray = is_array<_Tp>::value,
@@ -2752,33 +2752,33 @@ struct __destructible_imp;
27522752

27532753
template <class _Tp>
27542754
struct __destructible_imp<_Tp, false>
2755-
: public _VSTD::integral_constant<bool,
2756-
__is_destructor_wellformed<typename _VSTD::remove_all_extents<_Tp>::type>::value> {};
2755+
: public integral_constant<bool,
2756+
__is_destructor_wellformed<typename remove_all_extents<_Tp>::type>::value> {};
27572757

27582758
template <class _Tp>
27592759
struct __destructible_imp<_Tp, true>
2760-
: public _VSTD::true_type {};
2760+
: public true_type {};
27612761

27622762
template <class _Tp, bool>
27632763
struct __destructible_false;
27642764

27652765
template <class _Tp>
2766-
struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, _VSTD::is_reference<_Tp>::value> {};
2766+
struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, is_reference<_Tp>::value> {};
27672767

27682768
template <class _Tp>
2769-
struct __destructible_false<_Tp, true> : public _VSTD::false_type {};
2769+
struct __destructible_false<_Tp, true> : public false_type {};
27702770

27712771
template <class _Tp>
27722772
struct is_destructible
2773-
: public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {};
2773+
: public __destructible_false<_Tp, is_function<_Tp>::value> {};
27742774

27752775
template <class _Tp>
27762776
struct is_destructible<_Tp[]>
2777-
: public _VSTD::false_type {};
2777+
: public false_type {};
27782778

27792779
template <>
27802780
struct is_destructible<void>
2781-
: public _VSTD::false_type {};
2781+
: public false_type {};
27822782

27832783
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
27842784
template <class _Tp>

0 commit comments

Comments
 (0)