[libc++][NFC] Remove _VSTD:: when not needed.

Reviewed By: #libc, Quuxplusone

Differential Revision: https://reviews.llvm.org/D102133
This commit is contained in:
Mark de Wever 2021-05-09 18:22:52 +02:00
parent b0ef2070bc
commit cfef7c918b
8 changed files with 27 additions and 27 deletions

View File

@ -579,7 +579,7 @@ public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
element_type* operator->() const _NOEXCEPT element_type* operator->() const _NOEXCEPT
{ {
static_assert(!_VSTD::is_array<_Tp>::value, static_assert(!is_array<_Tp>::value,
"std::shared_ptr<T>::operator-> is only valid when T is not an array type."); "std::shared_ptr<T>::operator-> is only valid when T is not an array type.");
return __ptr_; return __ptr_;
} }
@ -607,7 +607,7 @@ public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
operator[](ptrdiff_t __i) const operator[](ptrdiff_t __i) const
{ {
static_assert(_VSTD::is_array<_Tp>::value, static_assert(is_array<_Tp>::value,
"std::shared_ptr<T>::operator[] is only valid when T is an array type."); "std::shared_ptr<T>::operator[] is only valid when T is an array type.");
return __ptr_[__i]; return __ptr_[__i];
} }

View File

@ -2483,8 +2483,8 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
__rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, __rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
_VSTD::forward_iterator_tag) _VSTD::forward_iterator_tag)
{ {
typedef typename _VSTD::iterator_traits<_ForwardIterator>::value_type value_type; typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
if (_VSTD::is_trivially_move_assignable<value_type>::value) if (is_trivially_move_assignable<value_type>::value)
{ {
if (_VSTD::next(__first) == __middle) if (_VSTD::next(__first) == __middle)
return _VSTD::__rotate_left(__first, __last); return _VSTD::__rotate_left(__first, __last);
@ -2496,10 +2496,10 @@ template <class _BidirectionalIterator>
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator _LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
__rotate(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, __rotate(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last,
_VSTD::bidirectional_iterator_tag) bidirectional_iterator_tag)
{ {
typedef typename _VSTD::iterator_traits<_BidirectionalIterator>::value_type value_type; typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
if (_VSTD::is_trivially_move_assignable<value_type>::value) if (is_trivially_move_assignable<value_type>::value)
{ {
if (_VSTD::next(__first) == __middle) if (_VSTD::next(__first) == __middle)
return _VSTD::__rotate_left(__first, __last); return _VSTD::__rotate_left(__first, __last);
@ -2513,10 +2513,10 @@ template <class _RandomAccessIterator>
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator _LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
__rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
_VSTD::random_access_iterator_tag) random_access_iterator_tag)
{ {
typedef typename _VSTD::iterator_traits<_RandomAccessIterator>::value_type value_type; typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
if (_VSTD::is_trivially_move_assignable<value_type>::value) if (is_trivially_move_assignable<value_type>::value)
{ {
if (_VSTD::next(__first) == __middle) if (_VSTD::next(__first) == __middle)
return _VSTD::__rotate_left(__first, __last); return _VSTD::__rotate_left(__first, __last);
@ -2537,7 +2537,7 @@ rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __l
if (__middle == __last) if (__middle == __last)
return __first; return __first;
return _VSTD::__rotate(__first, __middle, __last, return _VSTD::__rotate(__first, __middle, __last,
typename _VSTD::iterator_traits<_ForwardIterator>::iterator_category()); typename iterator_traits<_ForwardIterator>::iterator_category());
} }
// rotate_copy // rotate_copy

View File

@ -157,7 +157,7 @@ struct _CmpUnspecifiedParam {
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEVAL _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEVAL
_CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {} _CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {}
template<typename _Tp, typename = _VSTD::enable_if_t<!_VSTD::is_same_v<_Tp, int>>> template<typename _Tp, typename = enable_if_t<!is_same_v<_Tp, int>>>
_CmpUnspecifiedParam(_Tp) = delete; _CmpUnspecifiedParam(_Tp) = delete;
}; };

View File

@ -217,12 +217,12 @@ concept assignable_from =
// [concept.destructible] // [concept.destructible]
template<class _Tp> template<class _Tp>
concept destructible = _VSTD::is_nothrow_destructible_v<_Tp>; concept destructible = is_nothrow_destructible_v<_Tp>;
// [concept.constructible] // [concept.constructible]
template<class _Tp, class... _Args> template<class _Tp, class... _Args>
concept constructible_from = concept constructible_from =
destructible<_Tp> && _VSTD::is_constructible_v<_Tp, _Args...>; destructible<_Tp> && is_constructible_v<_Tp, _Args...>;
// [concept.default.init] // [concept.default.init]

View File

@ -105,13 +105,13 @@ class _LIBCPP_TEMPLATE_VIS basic_format_parse_context {
public: public:
using char_type = _CharT; using char_type = _CharT;
using const_iterator = using const_iterator =
typename _VSTD::basic_string_view<_CharT>::const_iterator; typename basic_string_view<_CharT>::const_iterator;
using iterator = const_iterator; using iterator = const_iterator;
public: public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
constexpr explicit basic_format_parse_context( constexpr explicit basic_format_parse_context(
_VSTD::basic_string_view<_CharT> __fmt, size_t __num_args = 0) noexcept basic_string_view<_CharT> __fmt, size_t __num_args = 0) noexcept
: __begin_(__fmt.begin()), : __begin_(__fmt.begin()),
__end_(__fmt.end()), __end_(__fmt.end()),
__indexing_(__unknown), __indexing_(__unknown),
@ -156,7 +156,7 @@ public:
// expressions ([expr.const]). // expressions ([expr.const]).
// Note: the Throws clause [format.parse.ctx]/10 doesn't specify the // Note: the Throws clause [format.parse.ctx]/10 doesn't specify the
// behavior when id >= num_args_. // behavior when id >= num_args_.
if (_VSTD::is_constant_evaluated() && __id >= __num_args_) if (is_constant_evaluated() && __id >= __num_args_)
__throw_format_error("Argument index outside the valid range"); __throw_format_error("Argument index outside the valid range");
} }

View File

@ -2050,7 +2050,7 @@ struct __policy
// faster for types that can be passed in registers. // faster for types that can be passed in registers.
template <typename _Tp> template <typename _Tp>
using __fast_forward = using __fast_forward =
typename _VSTD::conditional<_VSTD::is_scalar<_Tp>::value, _Tp, _Tp&&>::type; typename conditional<is_scalar<_Tp>::value, _Tp, _Tp&&>::type;
// __policy_invoker calls an instance of __alloc_func held in __policy_storage. // __policy_invoker calls an instance of __alloc_func held in __policy_storage.

View File

@ -518,7 +518,7 @@ basic_ostream<_CharT, _Traits> &
__quoted_output ( basic_ostream<_CharT, _Traits> &__os, __quoted_output ( basic_ostream<_CharT, _Traits> &__os,
_ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape ) _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape )
{ {
_VSTD::basic_string<_CharT, _Traits> __str; basic_string<_CharT, _Traits> __str;
__str.push_back(__delim); __str.push_back(__delim);
for ( ; __first != __last; ++ __first ) for ( ; __first != __last; ++ __first )
{ {

View File

@ -1316,11 +1316,11 @@ public:
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
template <typename _K2> template <typename _K2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
find(const _K2& __k) {return __tree_.find(__k);} find(const _K2& __k) {return __tree_.find(__k);}
template <typename _K2> template <typename _K2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
find(const _K2& __k) const {return __tree_.find(__k);} find(const _K2& __k) const {return __tree_.find(__k);}
#endif #endif
@ -1352,12 +1352,12 @@ public:
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
template <typename _K2> template <typename _K2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
lower_bound(const _K2& __k) {return __tree_.lower_bound(__k);} lower_bound(const _K2& __k) {return __tree_.lower_bound(__k);}
template <typename _K2> template <typename _K2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);} lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
#endif #endif
@ -1370,11 +1370,11 @@ public:
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
template <typename _K2> template <typename _K2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
upper_bound(const _K2& __k) {return __tree_.upper_bound(__k);} upper_bound(const _K2& __k) {return __tree_.upper_bound(__k);}
template <typename _K2> template <typename _K2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);} upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
#endif #endif
@ -1387,11 +1387,11 @@ public:
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
template <typename _K2> template <typename _K2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,pair<iterator,iterator>>::type typename enable_if<__is_transparent<_Compare, _K2>::value,pair<iterator,iterator>>::type
equal_range(const _K2& __k) {return __tree_.__equal_range_multi(__k);} equal_range(const _K2& __k) {return __tree_.__equal_range_multi(__k);}
template <typename _K2> template <typename _K2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,pair<const_iterator,const_iterator>>::type typename enable_if<__is_transparent<_Compare, _K2>::value,pair<const_iterator,const_iterator>>::type
equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);} equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
#endif #endif
}; };