[libc++] Remove more unnecessary _VSTD:: from type names. NFCI.

Differential Revision: https://reviews.llvm.org/D102181
This commit is contained in:
Arthur O'Dwyer 2021-05-10 13:13:04 -04:00
parent 866b27950a
commit 6491d99e33
8 changed files with 33 additions and 35 deletions

View File

@ -362,7 +362,7 @@ template <class _Tp>
struct __is_default_allocator : false_type { };
template <class _Tp>
struct __is_default_allocator<_VSTD::allocator<_Tp> > : true_type { };
struct __is_default_allocator<allocator<_Tp> > : true_type { };
// __is_cpp17_move_insertable
template <class _Alloc, class = void>

View File

@ -3195,7 +3195,7 @@ _SampleIterator __sample(_PopulationIterator __first,
__output_iter[__k] = *__first;
_Distance __sz = __k;
for (; __first != __last; ++__first, (void) ++__k) {
_Distance __r = _VSTD::uniform_int_distribution<_Distance>(0, __k)(__g);
_Distance __r = uniform_int_distribution<_Distance>(0, __k)(__g);
if (__r < __sz)
__output_iter[__r] = *__first;
}
@ -3212,8 +3212,7 @@ _SampleIterator __sample(_PopulationIterator __first,
forward_iterator_tag) {
_Distance __unsampled_sz = _VSTD::distance(__first, __last);
for (__n = _VSTD::min(__n, __unsampled_sz); __n != 0; ++__first) {
_Distance __r =
_VSTD::uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g);
_Distance __r = uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g);
if (__r < __n) {
*__output_iter++ = *__first;
--__n;
@ -4914,7 +4913,7 @@ template <class _RandomAccessIterator, class _Compare>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
typedef typename _VSTD::iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
difference_type __len = __last - __first;
difference_type __p = 0;
difference_type __c = 1;

View File

@ -122,8 +122,8 @@ public:
operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
{
return _VSTD::__search(__f, __l, __first_, __last_, __pred_,
typename _VSTD::iterator_traits<_ForwardIterator>::iterator_category(),
typename _VSTD::iterator_traits<_ForwardIterator2>::iterator_category());
typename iterator_traits<_ForwardIterator>::iterator_category(),
typename iterator_traits<_ForwardIterator2>::iterator_category());
}
private:
@ -212,7 +212,7 @@ private:
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
typedef _BMSkipTable<value_type, difference_type, _Hash, _BinaryPredicate,
_VSTD::is_integral<value_type>::value && // what about enums?
is_integral<value_type>::value && // what about enums?
sizeof(value_type) == 1 &&
is_same<_Hash, hash<value_type>>::value &&
is_same<_BinaryPredicate, equal_to<>>::value
@ -247,7 +247,7 @@ public:
if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
// If the pattern is larger than the corpus, we can't find it!
if ( __pattern_length_ > _VSTD::distance (__f, __l))
if ( __pattern_length_ > _VSTD::distance(__f, __l))
return make_pair(__l, __l);
// Do the search
@ -321,13 +321,13 @@ public: // TODO private:
vector<difference_type> & __suffix = *__suffix_.get();
if (__count > 0)
{
_VSTD::vector<value_type> __scratch(__count);
vector<value_type> __scratch(__count);
__compute_bm_prefix(__f, __l, __pred, __scratch);
for ( size_t __i = 0; __i <= __count; __i++ )
__suffix[__i] = __count - __scratch[__count-1];
typedef _VSTD::reverse_iterator<_RandomAccessIterator1> _RevIter;
typedef reverse_iterator<_RandomAccessIterator1> _RevIter;
__compute_bm_prefix(_RevIter(__l), _RevIter(__f), __pred, __scratch);
for ( size_t __i = 0; __i < __count; __i++ )
@ -363,7 +363,7 @@ private:
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
typedef _BMSkipTable<value_type, difference_type, _Hash, _BinaryPredicate,
_VSTD::is_integral<value_type>::value && // what about enums?
is_integral<value_type>::value && // what about enums?
sizeof(value_type) == 1 &&
is_same<_Hash, hash<value_type>>::value &&
is_same<_BinaryPredicate, equal_to<>>::value
@ -399,7 +399,7 @@ public:
if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
// If the pattern is larger than the corpus, we can't find it!
if ( __pattern_length_ > _VSTD::distance (__f, __l))
if ( __pattern_length_ > _VSTD::distance(__f, __l))
return make_pair(__l, __l);
// Do the search

View File

@ -105,7 +105,7 @@ using raw_invocation_type_t = typename raw_invocation_type<_Tp>::type;
// 3.3.4, Detection idiom
template <class...> using void_t = void;
struct nonesuch : private _VSTD::__nat { // make nonesuch "not an aggregate"
struct nonesuch : private __nat { // make nonesuch "not an aggregate"
~nonesuch() = delete;
nonesuch (nonesuch const&) = delete;
void operator=(nonesuch const&) = delete;

View File

@ -1962,11 +1962,11 @@ union __policy_storage
// True if _Fun can safely be held in __policy_storage.__small.
template <typename _Fun>
struct __use_small_storage
: public _VSTD::integral_constant<
: public integral_constant<
bool, sizeof(_Fun) <= sizeof(__policy_storage) &&
_LIBCPP_ALIGNOF(_Fun) <= _LIBCPP_ALIGNOF(__policy_storage) &&
_VSTD::is_trivially_copy_constructible<_Fun>::value &&
_VSTD::is_trivially_destructible<_Fun>::value> {};
is_trivially_copy_constructible<_Fun>::value &&
is_trivially_destructible<_Fun>::value> {};
// Policy contains information about how to copy, destroy, and move the
// underlying functor. You can think of it as a vtable of sorts.
@ -3190,8 +3190,8 @@ public:
operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
{
return _VSTD::__search(__f, __l, __first_, __last_, __pred_,
typename _VSTD::iterator_traits<_ForwardIterator>::iterator_category(),
typename _VSTD::iterator_traits<_ForwardIterator2>::iterator_category());
typename iterator_traits<_ForwardIterator>::iterator_category(),
typename iterator_traits<_ForwardIterator2>::iterator_category());
}
private:

View File

@ -863,7 +863,7 @@ void __swap_allocator(_Alloc & __a1, _Alloc & __a2)
#endif
{
_VSTD::__swap_allocator(__a1, __a2,
integral_constant<bool, _VSTD::allocator_traits<_Alloc>::propagate_on_container_swap::value>());
integral_constant<bool, allocator_traits<_Alloc>::propagate_on_container_swap::value>());
}
template <typename _Alloc, typename _Traits=allocator_traits<_Alloc> >

View File

@ -6292,8 +6292,7 @@ discrete_distribution<_IntType>::param_type::__init()
if (__p_.size() > 1)
{
double __s = _VSTD::accumulate(__p_.begin(), __p_.end(), 0.0);
for (_VSTD::vector<double>::iterator __i = __p_.begin(), __e = __p_.end();
__i < __e; ++__i)
for (vector<double>::iterator __i = __p_.begin(), __e = __p_.end(); __i < __e; ++__i)
*__i /= __s;
vector<double> __t(__p_.size() - 1);
_VSTD::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin());
@ -6312,7 +6311,7 @@ vector<double>
discrete_distribution<_IntType>::param_type::probabilities() const
{
size_t __n = __p_.size();
_VSTD::vector<double> __p(__n+1);
vector<double> __p(__n+1);
_VSTD::adjacent_difference(__p_.begin(), __p_.end(), __p.begin());
if (__n > 0)
__p[__n] = 1 - __p_[__n-1];

View File

@ -580,7 +580,7 @@ using _IsSame = _BoolConstant<
#ifdef __clang__
__is_same(_Tp, _Up)
#else
_VSTD::is_same<_Tp, _Up>::value
is_same<_Tp, _Up>::value
#endif
>;
@ -589,7 +589,7 @@ using _IsNotSame = _BoolConstant<
#ifdef __clang__
!__is_same(_Tp, _Up)
#else
!_VSTD::is_same<_Tp, _Up>::value
!is_same<_Tp, _Up>::value
#endif
>;
@ -1344,7 +1344,7 @@ template <class _Tp> _Tp __declval(long);
_LIBCPP_SUPPRESS_DEPRECATED_POP
template <class _Tp>
decltype(_VSTD::__declval<_Tp>(0))
decltype(__declval<_Tp>(0))
declval() _NOEXCEPT;
// __uncvref
@ -1712,7 +1712,7 @@ struct __is_convertible_test : public false_type {};
template <class _From, class _To>
struct __is_convertible_test<_From, _To,
decltype(_VSTD::__is_convertible_imp::__test_convert<_To>(declval<_From>()))> : public true_type
decltype(__is_convertible_imp::__test_convert<_To>(declval<_From>()))> : public true_type
{};
template <class _Tp, bool _IsArray = is_array<_Tp>::value,
@ -2752,33 +2752,33 @@ struct __destructible_imp;
template <class _Tp>
struct __destructible_imp<_Tp, false>
: public _VSTD::integral_constant<bool,
__is_destructor_wellformed<typename _VSTD::remove_all_extents<_Tp>::type>::value> {};
: public integral_constant<bool,
__is_destructor_wellformed<typename remove_all_extents<_Tp>::type>::value> {};
template <class _Tp>
struct __destructible_imp<_Tp, true>
: public _VSTD::true_type {};
: public true_type {};
template <class _Tp, bool>
struct __destructible_false;
template <class _Tp>
struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, _VSTD::is_reference<_Tp>::value> {};
struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, is_reference<_Tp>::value> {};
template <class _Tp>
struct __destructible_false<_Tp, true> : public _VSTD::false_type {};
struct __destructible_false<_Tp, true> : public false_type {};
template <class _Tp>
struct is_destructible
: public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {};
: public __destructible_false<_Tp, is_function<_Tp>::value> {};
template <class _Tp>
struct is_destructible<_Tp[]>
: public _VSTD::false_type {};
: public false_type {};
template <>
struct is_destructible<void>
: public _VSTD::false_type {};
: public false_type {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp>