[llvm-branch-commits] [libcxx] d586f92 - [libc++] Consistently replace `std::` qualification with `_VSTD::` or nothing. NFCI.
Arthur O'Dwyer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Dec 1 19:18:14 PST 2020
Author: Arthur O'Dwyer
Date: 2020-12-01T22:13:39-05:00
New Revision: d586f92c9456a972ee475a021525c0522b89587b
URL: https://github.com/llvm/llvm-project/commit/d586f92c9456a972ee475a021525c0522b89587b
DIFF: https://github.com/llvm/llvm-project/commit/d586f92c9456a972ee475a021525c0522b89587b.diff
LOG: [libc++] Consistently replace `std::` qualification with `_VSTD::` or nothing. NFCI.
I used a lot of `git grep` to find places where `std::` was being used
outside of comments and assert-messages. There were three outcomes:
- Qualified function calls, e.g. `std::move` becomes `_VSTD::move`.
This is the most common case.
- Typenames that don't need qualification, e.g. `std::allocator` becomes `allocator`.
Leaving these as `_VSTD::allocator` would also be fine, but I decided
that removing the qualification is more consistent with existing practice.
- Names that specifically need un-versioned `std::` qualification,
or that I wasn't sure about. For example, I didn't touch any code in
<atomic>, <math.h>, <new>, or any ext/ or experimental/ headers;
and I didn't touch any instances of `std::type_info`.
In some deduction guides, we were accidentally using `class Alloc = typename std::allocator<T>`,
despite `std::allocator<T>`'s type-ness not being template-dependent.
Because `std::allocator` is a qualified name, this did parse as we intended;
but what we meant was simply `class Alloc = allocator<T>`.
Differential Revision: https://reviews.llvm.org/D92250
Added:
Modified:
libcxx/include/__debug
libcxx/include/__hash_table
libcxx/include/__mutex_base
libcxx/include/__split_buffer
libcxx/include/__string
libcxx/include/__tree
libcxx/include/algorithm
libcxx/include/array
libcxx/include/barrier
libcxx/include/bit
libcxx/include/bitset
libcxx/include/cmath
libcxx/include/compare
libcxx/include/complex
libcxx/include/deque
libcxx/include/filesystem
libcxx/include/forward_list
libcxx/include/functional
libcxx/include/future
libcxx/include/iomanip
libcxx/include/iterator
libcxx/include/list
libcxx/include/memory
libcxx/include/numbers
libcxx/include/numeric
libcxx/include/random
libcxx/include/regex
libcxx/include/string_view
libcxx/include/type_traits
libcxx/include/typeinfo
libcxx/include/unordered_map
libcxx/include/utility
libcxx/include/variant
libcxx/include/vector
Removed:
################################################################################
diff --git a/libcxx/include/__debug b/libcxx/include/__debug
index 1829b3279d5a..be802755c34a 100644
--- a/libcxx/include/__debug
+++ b/libcxx/include/__debug
@@ -54,7 +54,7 @@ struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
__libcpp_debug_info(const char* __f, int __l, const char* __p, const char* __m)
: __file_(__f), __line_(__l), __pred_(__p), __msg_(__m) {}
- _LIBCPP_FUNC_VIS std::string what() const;
+ _LIBCPP_FUNC_VIS string what() const;
const char* __file_;
int __line_;
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index a004d59a4a08..96845cbd466f 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -120,7 +120,7 @@ inline _LIBCPP_INLINE_VISIBILITY
size_t
__next_hash_pow2(size_t __n)
{
- return __n < 2 ? __n : (size_t(1) << (std::numeric_limits<size_t>::digits - __libcpp_clz(__n-1)));
+ return __n < 2 ? __n : (size_t(1) << (numeric_limits<size_t>::digits - __libcpp_clz(__n-1)));
}
@@ -1036,7 +1036,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
size_type max_size() const _NOEXCEPT
{
- return std::min<size_type>(
+ return _VSTD::min<size_type>(
__node_traits::max_size(__node_alloc()),
numeric_limits<
diff erence_type >::max()
);
diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base
index c54a01994c6c..9c3e933b126a 100644
--- a/libcxx/include/__mutex_base
+++ b/libcxx/include/__mutex_base
@@ -379,12 +379,12 @@ __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d)
using __ratio = ratio_divide<_Period, nano>;
using __ns_rep = nanoseconds::rep;
- __ns_rep __result_max = std::numeric_limits<__ns_rep>::max();
+ __ns_rep __result_max = numeric_limits<__ns_rep>::max();
if (__d.count() > 0 && __d.count() > __result_max / __ratio::num) {
return nanoseconds::max();
}
- __ns_rep __result_min = std::numeric_limits<__ns_rep>::min();
+ __ns_rep __result_min = numeric_limits<__ns_rep>::min();
if (__d.count() < 0 && __d.count() < __result_min / __ratio::num) {
return nanoseconds::min();
}
diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index b1fbddcc6093..20480d19d31b 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -266,7 +266,7 @@ typename enable_if
>::type
__split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last)
{
- _ConstructTransaction __tx(&this->__end_, std::distance(__first, __last));
+ _ConstructTransaction __tx(&this->__end_, _VSTD::distance(__first, __last));
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, ++__first) {
__alloc_traits::construct(this->__alloc(),
_VSTD::__to_address(__tx.__pos_), *__first);
diff --git a/libcxx/include/__string b/libcxx/include/__string
index 08be8f1a7641..882be96b4fed 100644
--- a/libcxx/include/__string
+++ b/libcxx/include/__string
@@ -92,7 +92,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
- _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, std::allocator<_CharType> const&)) \
+ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, allocator<_CharType> const&)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::~basic_string()) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
@@ -108,7 +108,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
- _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, std::allocator<_CharType> const&)) \
+ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
_Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
@@ -158,7 +158,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
- _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, std::allocator<_CharType> const&)) \
+ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
_Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index 404351b4bd88..26c4c4121c5f 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -967,7 +967,7 @@ private:
template<class _Tp, class _Compare>
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_DIAGNOSE_WARNING(!std::__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
+ _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
"the specified comparator type does not provide a viable const call operator")
#endif
int __diagnose_non_const_comparator();
@@ -1120,7 +1120,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
size_type max_size() const _NOEXCEPT
- {return std::min<size_type>(
+ {return _VSTD::min<size_type>(
__node_traits::max_size(__node_alloc()),
numeric_limits<
diff erence_type >::max());}
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index f047ae1b1dee..970d36c16d1e 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -2708,12 +2708,12 @@ clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi)
template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX11
-std::pair<_ForwardIterator, _ForwardIterator>
+pair<_ForwardIterator, _ForwardIterator>
minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
"std::minmax_element requires a ForwardIterator");
- std::pair<_ForwardIterator, _ForwardIterator> __result(__first, __first);
+ pair<_ForwardIterator, _ForwardIterator> __result(__first, __first);
if (__first != __last)
{
if (++__first != __last)
@@ -2759,7 +2759,7 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __com
template <class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-std::pair<_ForwardIterator, _ForwardIterator>
+pair<_ForwardIterator, _ForwardIterator>
minmax_element(_ForwardIterator __first, _ForwardIterator __last)
{
return _VSTD::minmax_element(__first, __last,
@@ -2798,7 +2798,7 @@ minmax(initializer_list<_Tp> __t, _Compare __comp)
typedef typename initializer_list<_Tp>::const_iterator _Iter;
_Iter __first = __t.begin();
_Iter __last = __t.end();
- std::pair<_Tp, _Tp> __result(*__first, *__first);
+ pair<_Tp, _Tp> __result(*__first, *__first);
++__first;
if (__t.size() % 2 == 0)
@@ -3074,7 +3074,7 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
if (_Rp == 0)
return static_cast<result_type>(_Eng(__g, _Dt)());
size_t __w = _Dt - __libcpp_clz(_Rp) - 1;
- if ((_Rp & (std::numeric_limits<_UIntType>::max() >> (_Dt - __w))) != 0)
+ if ((_Rp & (numeric_limits<_UIntType>::max() >> (_Dt - __w))) != 0)
++__w;
_Eng __e(__g, __w);
_UIntType __u;
diff --git a/libcxx/include/array b/libcxx/include/array
index da2ae2e0c414..f4011c2ecee6 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -142,8 +142,8 @@ struct _LIBCPP_TEMPLATE_VIS array
typedef const value_type* const_pointer;
typedef size_t size_type;
typedef ptr
diff _t
diff erence_type;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
+ typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
_Tp __elems_[_Size];
@@ -155,7 +155,7 @@ struct _LIBCPP_TEMPLATE_VIS array
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) {
- std::swap_ranges(data(), data() + _Size, __a.data());
+ _VSTD::swap_ranges(data(), data() + _Size, __a.data());
}
// iterators:
@@ -245,8 +245,8 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
typedef const value_type* const_pointer;
typedef size_t size_type;
typedef ptr
diff _t
diff erence_type;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
+ typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
typedef typename conditional<is_const<_Tp>::value, const char,
char>::type _CharType;
diff --git a/libcxx/include/barrier b/libcxx/include/barrier
index 6589499ddb4d..987ff0aa5c1d 100644
--- a/libcxx/include/barrier
+++ b/libcxx/include/barrier
@@ -288,7 +288,7 @@ public:
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
barrier(ptr
diff _t __count, _CompletionF __completion = _CompletionF())
- : __b(__count, std::move(__completion)) {
+ : __b(__count, _VSTD::move(__completion)) {
}
barrier(barrier const&) = delete;
@@ -302,7 +302,7 @@ public:
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void wait(arrival_token&& __phase) const
{
- __b.wait(std::move(__phase));
+ __b.wait(_VSTD::move(__phase));
}
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void arrive_and_wait()
diff --git a/libcxx/include/bit b/libcxx/include/bit
index a720b2e6513f..a0f362d4ddf2 100644
--- a/libcxx/include/bit
+++ b/libcxx/include/bit
@@ -343,7 +343,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
unsigned __bit_log2(_Tp __t) _NOEXCEPT
{
static_assert(__bitop_unsigned_integer<_Tp>::value, "__bit_log2 requires unsigned");
- return std::numeric_limits<_Tp>::digits - 1 - __countl_zero(__t);
+ return numeric_limits<_Tp>::digits - 1 - __countl_zero(__t);
}
template <class _Tp>
diff --git a/libcxx/include/bitset b/libcxx/include/bitset
index 0096989eaf43..b0340b85e497 100644
--- a/libcxx/include/bitset
+++ b/libcxx/include/bitset
@@ -380,7 +380,7 @@ unsigned long long
__bitset<_N_words, _Size>::to_ullong(true_type, true_type) const
{
unsigned long long __r = __first_[0];
- for (std::size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i)
+ for (size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i)
__r |= static_cast<unsigned long long>(__first_[__i]) << (sizeof(__storage_type) * CHAR_BIT);
return __r;
}
diff --git a/libcxx/include/cmath b/libcxx/include/cmath
index 0901a23a2498..138ae6f99aad 100644
--- a/libcxx/include/cmath
+++ b/libcxx/include/cmath
@@ -660,8 +660,8 @@ _LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT {
template <class _IntT, class _RealT>
_LIBCPP_INLINE_VISIBILITY
_IntT __clamp_to_integral(_RealT __r) _NOEXCEPT {
- using _Lim = std::numeric_limits<_IntT>;
- const _IntT _MaxVal = std::__max_representable_int_for_float<_IntT, _RealT>();
+ using _Lim = numeric_limits<_IntT>;
+ const _IntT _MaxVal = __max_representable_int_for_float<_IntT, _RealT>();
if (__r >= ::nextafter(static_cast<_RealT>(_MaxVal), INFINITY)) {
return _Lim::max();
} else if (__r <= _Lim::lowest()) {
diff --git a/libcxx/include/compare b/libcxx/include/compare
index 596505f8860d..048f4821dd4e 100644
--- a/libcxx/include/compare
+++ b/libcxx/include/compare
@@ -701,8 +701,8 @@ constexpr _ClassifyCompCategory __type_to_enum() noexcept {
template <size_t _Size>
constexpr _ClassifyCompCategory
-__compute_comp_type(std::array<_ClassifyCompCategory, _Size> __types) {
- std::array<int, _CCC_Size> __seen = {};
+__compute_comp_type(array<_ClassifyCompCategory, _Size> __types) {
+ array<int, _CCC_Size> __seen = {};
for (auto __type : __types)
++__seen[__type];
if (__seen[_None])
diff --git a/libcxx/include/complex b/libcxx/include/complex
index ed84cd4cd39f..93b7bb5dd53e 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -950,7 +950,7 @@ inline _LIBCPP_INLINE_VISIBILITY
complex<_Tp>
proj(const complex<_Tp>& __c)
{
- std::complex<_Tp> __r = __c;
+ complex<_Tp> __r = __c;
if (__libcpp_isinf_or_builtin(__c.real()) || __libcpp_isinf_or_builtin(__c.imag()))
__r = complex<_Tp>(INFINITY, copysign(_Tp(0), __c.imag()));
return __r;
diff --git a/libcxx/include/deque b/libcxx/include/deque
index c66b10225bc0..c6517d170f34 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -1393,7 +1393,7 @@ public:
size_type size() const _NOEXCEPT {return __base::size();}
_LIBCPP_INLINE_VISIBILITY
size_type max_size() const _NOEXCEPT
- {return std::min<size_type>(
+ {return _VSTD::min<size_type>(
__alloc_traits::max_size(__base::__alloc()),
numeric_limits<
diff erence_type>::max());}
void resize(size_type __n);
@@ -1586,7 +1586,7 @@ public:
#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
template<class _InputIterator,
- class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>,
+ class _Alloc = allocator<typename iterator_traits<_InputIterator>::value_type>,
class = typename enable_if<__is_allocator<_Alloc>::value, void>::type
>
deque(_InputIterator, _InputIterator)
diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem
index a39184c4a27d..b4a64768500d 100644
--- a/libcxx/include/filesystem
+++ b/libcxx/include/filesystem
@@ -994,8 +994,8 @@ public:
_LIBCPP_INLINE_VISIBILITY operator string_type() const { return __pn_; }
- _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; }
- _LIBCPP_INLINE_VISIBILITY std::string u8string() const { return __pn_; }
+ _LIBCPP_INLINE_VISIBILITY _VSTD::string string() const { return __pn_; }
+ _LIBCPP_INLINE_VISIBILITY _VSTD::string u8string() const { return __pn_; }
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template <class _ECharT, class _Traits = char_traits<_ECharT>,
@@ -1010,20 +1010,20 @@ public:
return __s;
}
- _LIBCPP_INLINE_VISIBILITY std::wstring wstring() const {
+ _LIBCPP_INLINE_VISIBILITY _VSTD::wstring wstring() const {
return string<wchar_t>();
}
- _LIBCPP_INLINE_VISIBILITY std::u16string u16string() const {
+ _LIBCPP_INLINE_VISIBILITY _VSTD::u16string u16string() const {
return string<char16_t>();
}
- _LIBCPP_INLINE_VISIBILITY std::u32string u32string() const {
+ _LIBCPP_INLINE_VISIBILITY _VSTD::u32string u32string() const {
return string<char32_t>();
}
#endif
// generic format observers
- std::string generic_string() const { return __pn_; }
- std::string generic_u8string() const { return __pn_; }
+ _VSTD::string generic_string() const { return __pn_; }
+ _VSTD::string generic_u8string() const { return __pn_; }
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template <class _ECharT, class _Traits = char_traits<_ECharT>,
@@ -1033,9 +1033,9 @@ public:
return string<_ECharT, _Traits, _Allocator>(__a);
}
- std::wstring generic_wstring() const { return string<wchar_t>(); }
- std::u16string generic_u16string() const { return string<char16_t>(); }
- std::u32string generic_u32string() const { return string<char32_t>(); }
+ _VSTD::wstring generic_wstring() const { return string<wchar_t>(); }
+ _VSTD::u16string generic_u16string() const { return string<char16_t>(); }
+ _VSTD::u32string generic_u32string() const { return string<char32_t>(); }
#endif
private:
@@ -1147,7 +1147,7 @@ public:
is_same<_Traits, char_traits<char> >::value,
basic_ostream<_CharT, _Traits>&>::type
operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) {
- __os << std::__quoted(__p.native());
+ __os << _VSTD::__quoted(__p.native());
return __os;
}
@@ -1157,7 +1157,7 @@ public:
!is_same<_Traits, char_traits<char> >::value,
basic_ostream<_CharT, _Traits>&>::type
operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) {
- __os << std::__quoted(__p.string<_CharT, _Traits>());
+ __os << _VSTD::__quoted(__p.string<_CharT, _Traits>());
return __os;
}
@@ -1249,7 +1249,7 @@ public:
typedef bidirectional_iterator_tag iterator_category;
typedef path value_type;
- typedef std::ptr
diff _t
diff erence_type;
+ typedef ptr
diff _t
diff erence_type;
typedef const path* pointer;
typedef const path& reference;
@@ -1393,7 +1393,7 @@ template <class... _Args>
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
#ifndef _LIBCPP_NO_EXCEPTIONS
void __throw_filesystem_error(_Args&&... __args) {
- throw filesystem_error(std::forward<_Args>(__args)...);
+ throw filesystem_error(_VSTD::forward<_Args>(__args)...);
}
#else
void __throw_filesystem_error(_Args&&...) {
@@ -2223,7 +2223,7 @@ private:
_LIBCPP_INLINE_VISIBILITY
void __assign_iter_entry(_Path&& __p, __cached_data __dt) {
- __p_ = std::move(__p);
+ __p_ = _VSTD::move(__p);
__data_ = __dt;
}
@@ -2524,10 +2524,10 @@ end(const directory_iterator&) noexcept {
class recursive_directory_iterator {
public:
using value_type = directory_entry;
- using
diff erence_type = std::ptr
diff _t;
+ using
diff erence_type = ptr
diff _t;
using pointer = directory_entry const*;
using reference = directory_entry const&;
- using iterator_category = std::input_iterator_tag;
+ using iterator_category = input_iterator_tag;
public:
// constructors and destructor
diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list
index 96b537c751b1..d3d6b8238f6b 100644
--- a/libcxx/include/forward_list
+++ b/libcxx/include/forward_list
@@ -758,7 +758,7 @@ public:
{return base::__before_begin()->__next_ == nullptr;}
_LIBCPP_INLINE_VISIBILITY
size_type max_size() const _NOEXCEPT {
- return std::min<size_type>(
+ return _VSTD::min<size_type>(
__node_traits::max_size(base::__alloc()),
numeric_limits<
diff erence_type>::max());
}
@@ -871,7 +871,7 @@ private:
#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
template<class _InputIterator,
- class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>,
+ class _Alloc = allocator<typename iterator_traits<_InputIterator>::value_type>,
class = typename enable_if<__is_allocator<_Alloc>::value, void>::type
>
forward_list(_InputIterator, _InputIterator)
diff --git a/libcxx/include/functional b/libcxx/include/functional
index 0979e7d2bd1d..22c73c5790bd 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -1592,7 +1592,7 @@ public:
const _Target& __target() const { return __f_; }
_LIBCPP_INLINE_VISIBILITY
- explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {}
+ explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {}
_LIBCPP_INLINE_VISIBILITY
explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}
@@ -1799,7 +1799,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
template <class _Fp,
class = typename enable_if<!is_same<typename decay<_Fp>::type, __value_func>::value>::type>
_LIBCPP_INLINE_VISIBILITY explicit __value_func(_Fp&& __f)
- : __value_func(std::forward<_Fp>(__f), allocator<_Fp>()) {}
+ : __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {}
_LIBCPP_INLINE_VISIBILITY
__value_func(const __value_func& __f)
@@ -2517,7 +2517,7 @@ template<class _Rp, class ..._ArgTypes>
function<_Rp(_ArgTypes...)>&
function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
{
- __f_ = std::move(__f.__f_);
+ __f_ = _VSTD::move(__f.__f_);
return *this;
}
diff --git a/libcxx/include/future b/libcxx/include/future
index 409fa8e90b87..6e755c829c67 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -1055,7 +1055,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
future& operator=(future&& __rhs) _NOEXCEPT
{
- future(std::move(__rhs)).swap(*this);
+ future(_VSTD::move(__rhs)).swap(*this);
return *this;
}
@@ -1142,7 +1142,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
future& operator=(future&& __rhs) _NOEXCEPT
{
- future(std::move(__rhs)).swap(*this);
+ future(_VSTD::move(__rhs)).swap(*this);
return *this;
}
@@ -1224,7 +1224,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
future& operator=(future&& __rhs) _NOEXCEPT
{
- future(std::move(__rhs)).swap(*this);
+ future(_VSTD::move(__rhs)).swap(*this);
return *this;
}
@@ -1291,7 +1291,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
promise& operator=(promise&& __rhs) _NOEXCEPT
{
- promise(std::move(__rhs)).swap(*this);
+ promise(_VSTD::move(__rhs)).swap(*this);
return *this;
}
promise& operator=(const promise& __rhs) = delete;
@@ -1436,7 +1436,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
promise& operator=(promise&& __rhs) _NOEXCEPT
{
- promise(std::move(__rhs)).swap(*this);
+ promise(_VSTD::move(__rhs)).swap(*this);
return *this;
}
promise& operator=(const promise& __rhs) = delete;
@@ -1562,7 +1562,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
promise& operator=(promise&& __rhs) _NOEXCEPT
{
- promise(std::move(__rhs)).swap(*this);
+ promise(_VSTD::move(__rhs)).swap(*this);
return *this;
}
promise& operator=(const promise& __rhs) = delete;
@@ -2252,7 +2252,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
{
- shared_future(std::move(__rhs)).swap(*this);
+ shared_future(_VSTD::move(__rhs)).swap(*this);
return *this;
}
@@ -2322,7 +2322,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
{
- shared_future(std::move(__rhs)).swap(*this);
+ shared_future(_VSTD::move(__rhs)).swap(*this);
return *this;
}
@@ -2392,7 +2392,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
{
- shared_future(std::move(__rhs)).swap(*this);
+ shared_future(_VSTD::move(__rhs)).swap(*this);
return *this;
}
diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip
index 3f78f4d02b3c..536aa1c229c6 100644
--- a/libcxx/include/iomanip
+++ b/libcxx/include/iomanip
@@ -514,7 +514,7 @@ put_time(const tm* __tm, const _CharT* __fmt)
}
template <class _CharT, class _Traits, class _ForwardIterator>
-std::basic_ostream<_CharT, _Traits> &
+basic_ostream<_CharT, _Traits> &
__quoted_output ( basic_ostream<_CharT, _Traits> &__os,
_ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape )
{
diff --git a/libcxx/include/iterator b/libcxx/include/iterator
index d4667d39ddb8..90b5f41132d9 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -495,12 +495,11 @@ struct __has_iterator_typedefs
private:
struct __two {char __lx; char __lxx;};
template <class _Up> static __two __test(...);
- template <class _Up> static char __test(typename std::__void_t<typename _Up::iterator_category>::type* = 0,
- typename std::__void_t<typename _Up::
diff erence_type>::type* = 0,
- typename std::__void_t<typename _Up::value_type>::type* = 0,
- typename std::__void_t<typename _Up::reference>::type* = 0,
- typename std::__void_t<typename _Up::pointer>::type* = 0
- );
+ template <class _Up> static char __test(typename __void_t<typename _Up::iterator_category>::type* = 0,
+ typename __void_t<typename _Up::
diff erence_type>::type* = 0,
+ typename __void_t<typename _Up::value_type>::type* = 0,
+ typename __void_t<typename _Up::reference>::type* = 0,
+ typename __void_t<typename _Up::pointer>::type* = 0);
public:
static const bool value = sizeof(__test<_Tp>(0,0,0,0,0)) == 1;
};
diff --git a/libcxx/include/list b/libcxx/include/list
index 7e4c76ddb8d3..ad60b3b17f53 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -735,7 +735,7 @@ inline __list_imp<_Tp, _Alloc>::__list_imp(const __node_allocator& __a)
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
inline __list_imp<_Tp, _Alloc>::__list_imp(__node_allocator&& __a) _NOEXCEPT
- : __size_alloc_(0, std::move(__a)) {}
+ : __size_alloc_(0, _VSTD::move(__a)) {}
#endif
template <class _Tp, class _Alloc>
@@ -799,9 +799,9 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
__libcpp_db* __db = __get_db();
__c_node* __cn1 = __db->__find_c_and_lock(this);
__c_node* __cn2 = __db->__find_c(&__c);
- std::swap(__cn1->beg_, __cn2->beg_);
- std::swap(__cn1->end_, __cn2->end_);
- std::swap(__cn1->cap_, __cn2->cap_);
+ _VSTD::swap(__cn1->beg_, __cn2->beg_);
+ _VSTD::swap(__cn1->end_, __cn2->end_);
+ _VSTD::swap(__cn1->cap_, __cn2->cap_);
for (__i_node** __p = __cn1->end_; __p != __cn1->beg_;)
{
--__p;
@@ -937,7 +937,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
size_type max_size() const _NOEXCEPT
{
- return std::min<size_type>(
+ return _VSTD::min<size_type>(
base::__node_alloc_max_size(),
numeric_limits<
diff erence_type >::max());
}
@@ -1144,7 +1144,7 @@ private:
#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
template<class _InputIterator,
- class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>,
+ class _Alloc = allocator<typename iterator_traits<_InputIterator>::value_type>,
class = typename enable_if<__is_allocator<_Alloc>::value, void>::type
>
list(_InputIterator, _InputIterator)
diff --git a/libcxx/include/memory b/libcxx/include/memory
index f42f03f53f80..9cdac6afc5ea 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -1027,7 +1027,7 @@ template <bool _UsePointerTraits> struct __to_address_helper;
template <> struct __to_address_helper<true> {
template <class _Pointer>
- using __return_type = decltype(pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()));
+ using __return_type = decltype(pointer_traits<_Pointer>::to_address(_VSTD::declval<const _Pointer&>()));
template <class _Pointer>
_LIBCPP_CONSTEXPR
@@ -1062,7 +1062,7 @@ template <> struct __to_address_helper<false> {
template <class _Pointer>
_LIBCPP_CONSTEXPR
static __return_type<_Pointer>
- __do_it(const _Pointer &__p) _NOEXCEPT { return std::__to_address(__p.operator->()); }
+ __do_it(const _Pointer &__p) _NOEXCEPT { return _VSTD::__to_address(__p.operator->()); }
};
@@ -1332,7 +1332,7 @@ struct __has_destroy : false_type {};
template <class _Alloc, class _Pointer>
struct __has_destroy<_Alloc, _Pointer, typename __void_t<
decltype(_VSTD::declval<_Alloc>().destroy(_VSTD::declval<_Pointer>()))
->::type> : std::true_type {};
+>::type> : true_type {};
template <class _Alloc>
struct __has_max_size
@@ -1373,9 +1373,9 @@ template <class _Alloc,
>
struct __is_cpp17_move_insertable;
template <class _Alloc>
-struct __is_cpp17_move_insertable<_Alloc, true> : std::true_type {};
+struct __is_cpp17_move_insertable<_Alloc, true> : true_type {};
template <class _Alloc>
-struct __is_cpp17_move_insertable<_Alloc, false> : std::is_move_constructible<typename _Alloc::value_type> {};
+struct __is_cpp17_move_insertable<_Alloc, false> : is_move_constructible<typename _Alloc::value_type> {};
template <class _Alloc,
bool = __has_construct<_Alloc, typename _Alloc::value_type*, const typename _Alloc::value_type&>::value && !__is_default_allocator<_Alloc>::value
@@ -1385,7 +1385,7 @@ template <class _Alloc>
struct __is_cpp17_copy_insertable<_Alloc, true> : __is_cpp17_move_insertable<_Alloc> {};
template <class _Alloc>
struct __is_cpp17_copy_insertable<_Alloc, false> : integral_constant<bool,
- std::is_copy_constructible<typename _Alloc::value_type>::value &&
+ is_copy_constructible<typename _Alloc::value_type>::value &&
__is_cpp17_move_insertable<_Alloc>::value>
{};
@@ -1842,8 +1842,8 @@ get_temporary_buffer(ptr
diff _t __n) _NOEXCEPT
#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp)))
{
- std::align_val_t __al =
- std::align_val_t(std::alignment_of<_Tp>::value);
+ align_val_t __al =
+ align_val_t(alignment_of<_Tp>::value);
__r.first = static_cast<_Tp*>(::operator new(
__n * sizeof(_Tp), __al, nothrow));
} else {
@@ -2045,7 +2045,7 @@ public:
template <class _U1, class _U2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
__compressed_pair(_U1&& __t1, _U2&& __t2)
- : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {}
+ : _Base1(_VSTD::forward<_U1>(__t1)), _Base2(_VSTD::forward<_U2>(__t2)) {}
#ifndef _LIBCPP_CXX03_LANG
template <class... _Args1, class... _Args2>
@@ -2083,7 +2083,7 @@ public:
_NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
__is_nothrow_swappable<_T2>::value)
{
- using std::swap;
+ using _VSTD::swap;
swap(first(), __x.first());
swap(second(), __x.second());
}
@@ -3081,7 +3081,7 @@ _ForwardIt uninitialized_move(_InputIt __first, _InputIt __last, _ForwardIt __fi
try {
#endif
for (; __first != __last; (void)++__idx, ++__first)
- ::new((void*)_VSTD::addressof(*__idx)) _Vt(std::move(*__first));
+ ::new((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first));
return __idx;
#ifndef _LIBCPP_NO_EXCEPTIONS
} catch (...) {
@@ -3101,7 +3101,7 @@ uninitialized_move_n(_InputIt __first, _Size __n, _ForwardIt __first_res) {
try {
#endif
for (; __n > 0; ++__idx, (void)++__first, --__n)
- ::new((void*)_VSTD::addressof(*__idx)) _Vt(std::move(*__first));
+ ::new((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first));
return {__first, __idx};
#ifndef _LIBCPP_NO_EXCEPTIONS
} catch (...) {
@@ -4972,7 +4972,7 @@ struct __builtin_new_allocator {
: __size_(__size), __align_(__align) {}
void operator()(void* p) const _NOEXCEPT {
- std::__libcpp_deallocate(p, __size_, __align_);
+ _VSTD::__libcpp_deallocate(p, __size_, __align_);
}
private:
@@ -4983,13 +4983,13 @@ struct __builtin_new_allocator {
typedef unique_ptr<void, __builtin_new_deleter> __holder_t;
static __holder_t __allocate_bytes(size_t __s, size_t __align) {
- return __holder_t(std::__libcpp_allocate(__s, __align),
+ return __holder_t(_VSTD::__libcpp_allocate(__s, __align),
__builtin_new_deleter(__s, __align));
}
static void __deallocate_bytes(void* __p, size_t __s,
size_t __align) _NOEXCEPT {
- std::__libcpp_deallocate(__p, __s, __align);
+ _VSTD::__libcpp_deallocate(__p, __s, __align);
}
template <class _Tp>
diff --git a/libcxx/include/numbers b/libcxx/include/numbers
index e7d981be4aa4..38dad9955487 100644
--- a/libcxx/include/numbers
+++ b/libcxx/include/numbers
@@ -100,7 +100,7 @@ template <class T> inline constexpr T egamma_v = __illformed<T>{};
template <class T> inline constexpr T phi_v = __illformed<T>{};
template <class T>
-concept __floating_point = std::is_floating_point_v<T>;
+concept __floating_point = is_floating_point_v<T>;
template <__floating_point T> inline constexpr T e_v<T> = 2.718281828459045235360287471352662;
template <__floating_point T> inline constexpr T log2e_v<T> = 1.442695040888963407359924681001892;
diff --git a/libcxx/include/numeric b/libcxx/include/numeric
index ed06fcc49d5b..4f202bb84f70 100644
--- a/libcxx/include/numeric
+++ b/libcxx/include/numeric
@@ -377,7 +377,7 @@ _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryOp __b)
{
if (__first != __last) {
- typename std::iterator_traits<_InputIterator>::value_type __init = *__first;
+ typename iterator_traits<_InputIterator>::value_type __init = *__first;
*__result++ = __init;
if (++__first != __last)
return _VSTD::inclusive_scan(__first, __last, __result, __b, __init);
@@ -391,7 +391,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last,
_OutputIterator __result)
{
- return _VSTD::inclusive_scan(__first, __last, __result, std::plus<>());
+ return _VSTD::inclusive_scan(__first, __last, __result, _VSTD::plus<>());
}
template <class _InputIterator, class _OutputIterator, class _Tp,
@@ -437,7 +437,7 @@ transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryOp __b, _UnaryOp __u)
{
if (__first != __last) {
- typename std::iterator_traits<_InputIterator>::value_type __init = __u(*__first);
+ typename iterator_traits<_InputIterator>::value_type __init = __u(*__first);
*__result++ = __init;
if (++__first != __last)
return _VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init);
@@ -576,8 +576,8 @@ enable_if_t<is_integral_v<_Tp> && !is_same_v<bool, _Tp> && !is_null_pointer_v<_T
midpoint(_Tp __a, _Tp __b) noexcept
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
{
- using _Up = std::make_unsigned_t<_Tp>;
- constexpr _Up __bitshift = std::numeric_limits<_Up>::digits - 1;
+ using _Up = make_unsigned_t<_Tp>;
+ constexpr _Up __bitshift = numeric_limits<_Up>::digits - 1;
_Up __
diff = _Up(__b) - _Up(__a);
_Up __sign_bit = __b < __a;
diff --git a/libcxx/include/random b/libcxx/include/random
index 32f91489a36f..3cb2d30ed732 100644
--- a/libcxx/include/random
+++ b/libcxx/include/random
@@ -4660,7 +4660,7 @@ poisson_distribution<_IntType>::param_type::param_type(double __mean)
{
__s_ = _VSTD::sqrt(__mean_);
__d_ = 6 * __mean_ * __mean_;
- __l_ = std::trunc(__mean_ - 1.1484);
+ __l_ = _VSTD::trunc(__mean_ - 1.1484);
__omega_ = .3989423 / __s_;
double __b1_ = .4166667E-1 / __mean_;
double __b2_ = .3 * __b1_ * __b1_;
@@ -4692,13 +4692,13 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
double __u;
if (__g > 0)
{
- __tx = std::trunc(__g);
+ __tx = _VSTD::trunc(__g);
if (__tx >= __pr.__l_)
- return std::__clamp_to_integral<result_type>(__tx);
+ return _VSTD::__clamp_to_integral<result_type>(__tx);
__difmuk = __pr.__mean_ - __tx;
__u = __urd(__urng);
if (__pr.__d_ * __u >= __difmuk * __difmuk * __difmuk)
- return std::__clamp_to_integral<result_type>(__tx);
+ return _VSTD::__clamp_to_integral<result_type>(__tx);
}
exponential_distribution<double> __edist;
for (bool __using_exp_dist = false; true; __using_exp_dist = true)
@@ -4714,7 +4714,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
__u += __u - 1;
__t = 1.8 + (__u < 0 ? -__e : __e);
} while (__t <= -.6744);
- __tx = std::trunc(__pr.__mean_ + __pr.__s_ * __t);
+ __tx = _VSTD::trunc(__pr.__mean_ + __pr.__s_ * __t);
__difmuk = __pr.__mean_ - __tx;
__using_exp_dist = true;
}
@@ -4758,7 +4758,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
}
}
}
- return std::__clamp_to_integral<result_type>(__tx);
+ return _VSTD::__clamp_to_integral<result_type>(__tx);
}
template <class _CharT, class _Traits, class _IntType>
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 028831d72e0b..7c5b2fd61b93 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -2475,7 +2475,7 @@ __bracket_expression<_CharT, _Traits>::__exec(__state& __s) const
{
const bool __in_neg_mask = __traits_.isctype(__ch, __neg_mask_);
const bool __in_neg_chars =
- std::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) !=
+ _VSTD::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) !=
__neg_chars_.end();
if (!(__in_neg_mask || __in_neg_chars))
{
@@ -4153,7 +4153,7 @@ basic_regex<_CharT, _Traits>::__parse_DUP_COUNT(_ForwardIterator __first,
__first != __last && ( __val = __traits_.value(*__first, 10)) != -1;
++__first)
{
- if (__c >= std::numeric_limits<int>::max() / 10)
+ if (__c >= numeric_limits<int>::max() / 10)
__throw_regex_error<regex_constants::error_badbrace>();
__c *= 10;
__c += __val;
@@ -4417,7 +4417,7 @@ basic_regex<_CharT, _Traits>::__parse_decimal_escape(_ForwardIterator __first,
for (++__first;
__first != __last && '0' <= *__first && *__first <= '9'; ++__first)
{
- if (__v >= std::numeric_limits<unsigned>::max() / 10)
+ if (__v >= numeric_limits<unsigned>::max() / 10)
__throw_regex_error<regex_constants::error_backref>();
__v = 10 * __v + *__first - '0';
}
@@ -5590,7 +5590,7 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output_i
'0' <= __fmt_first[1] && __fmt_first[1] <= '9')
{
++__fmt_first;
- if (__idx >= std::numeric_limits<size_t>::max() / 10)
+ if (__idx >= numeric_limits<size_t>::max() / 10)
__throw_regex_error<regex_constants::error_escape>();
__idx = 10 * __idx + *__fmt_first - '0';
}
@@ -6401,7 +6401,7 @@ public:
regex_constants::match_flag_type __m =
regex_constants::match_default);
#if _LIBCPP_STD_VER > 11
- template <std::size_t _Np>
+ template <size_t _Np>
regex_token_iterator(_BidirectionalIterator __a,
_BidirectionalIterator __b,
const regex_type&& __re,
diff --git a/libcxx/include/string_view b/libcxx/include/string_view
index 884bcf806c45..7c3214fb2c2e 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -236,7 +236,7 @@ public:
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
basic_string_view(const _CharT* __s)
- : __data(__s), __size(std::__char_traits_length_checked<_Traits>(__s)) {}
+ : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
// [string.view.iterators], iterators
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index 733b7eb2a6f2..cd6a1633df80 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -514,7 +514,7 @@ template <template <class...> class, class ...>
false_type __sfinae_test_impl(...);
template <template <class ...> class _Templ, class ..._Args>
-using _IsValidExpansion _LIBCPP_NODEBUG_TYPE = decltype(std::__sfinae_test_impl<_Templ, _Args...>(0));
+using _IsValidExpansion _LIBCPP_NODEBUG_TYPE = decltype(__sfinae_test_impl<_Templ, _Args...>(0));
template <class>
struct __void_t { typedef void type; };
@@ -2550,7 +2550,7 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_destructible_v = __is_destructible(
// if it's a function, return false
// if it's void, return false
// if it's an array of unknown bound, return false
-// Otherwise, return "std::declval<_Up&>().~_Up()" is well-formed
+// Otherwise, return "declval<_Up&>().~_Up()" is well-formed
// where _Up is remove_all_extents<_Tp>::type
template <class>
diff --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo
index 6c955f53ac87..048e57614aff 100644
--- a/libcxx/include/typeinfo
+++ b/libcxx/include/typeinfo
@@ -262,7 +262,7 @@ struct __type_info_implementations {
private:
// The unique bit is the top bit. It is expected that __type_name_t is 64 bits when
// this implementation is actually used.
- typedef std::integral_constant<__type_name_t,
+ typedef integral_constant<__type_name_t,
(1ULL << ((__CHAR_BIT__ * sizeof(__type_name_t)) - 1))> __non_unique_rtti_bit;
_LIBCPP_INLINE_VISIBILITY
diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map
index 9a00fd76f28d..d595302e633b 100644
--- a/libcxx/include/unordered_map
+++ b/libcxx/include/unordered_map
@@ -1178,7 +1178,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args)
{
- return __table_.__emplace_unique_key_args(__k, _VSTD::piecewise_construct,
+ return __table_.__emplace_unique_key_args(__k, piecewise_construct,
_VSTD::forward_as_tuple(__k),
_VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
}
@@ -1187,7 +1187,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args)
{
- return __table_.__emplace_unique_key_args(__k, _VSTD::piecewise_construct,
+ return __table_.__emplace_unique_key_args(__k, piecewise_construct,
_VSTD::forward_as_tuple(_VSTD::move(__k)),
_VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
}
@@ -1738,8 +1738,8 @@ _Tp&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
{
return __table_.__emplace_unique_key_args(__k,
- std::piecewise_construct, std::forward_as_tuple(__k),
- std::forward_as_tuple()).first->__get_value().second;
+ piecewise_construct, _VSTD::forward_as_tuple(__k),
+ _VSTD::forward_as_tuple()).first->__get_value().second;
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
@@ -1747,8 +1747,8 @@ _Tp&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k)
{
return __table_.__emplace_unique_key_args(__k,
- std::piecewise_construct, std::forward_as_tuple(std::move(__k)),
- std::forward_as_tuple()).first->__get_value().second;
+ piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__k)),
+ _VSTD::forward_as_tuple()).first->__get_value().second;
}
#else // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/utility b/libcxx/include/utility
index 5c9e2b6ddef2..2af552b4b347 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -970,7 +970,7 @@ _Size
__loadword(const void* __p)
{
_Size __r;
- std::memcpy(&__r, __p, sizeof(__r));
+ _VSTD::memcpy(&__r, __p, sizeof(__r));
return __r;
}
@@ -1189,7 +1189,7 @@ __murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len)
__v = __weak_hash_len_32_with_seeds(__s, __v.second * __k1, __x + __w.first);
__w = __weak_hash_len_32_with_seeds(__s + 32, __z + __w.second,
__y + __loadword<_Size>(__s + 16));
- std::swap(__z, __x);
+ _VSTD::swap(__z, __x);
__s += 64;
__len -= 64;
} while (__len != 0);
@@ -1593,7 +1593,7 @@ using __check_hash_requirements _LIBCPP_NODEBUG_TYPE = integral_constant<bool,
__invokable_r<size_t, _Hash, _Key const&>::value
>;
-template <class _Key, class _Hash = std::hash<_Key> >
+template <class _Key, class _Hash = hash<_Key> >
using __has_enabled_hash _LIBCPP_NODEBUG_TYPE = integral_constant<bool,
__check_hash_requirements<_Key, _Hash>::value &&
is_default_constructible<_Hash>::value
diff --git a/libcxx/include/variant b/libcxx/include/variant
index 3621f2c68f52..daa3dd2d71c6 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -294,9 +294,9 @@ struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
_LIBCPP_INLINE_VAR constexpr size_t variant_npos = static_cast<size_t>(-1);
constexpr int __choose_index_type(unsigned int __num_elem) {
- if (__num_elem < std::numeric_limits<unsigned char>::max())
+ if (__num_elem < numeric_limits<unsigned char>::max())
return 0;
- if (__num_elem < std::numeric_limits<unsigned short>::max())
+ if (__num_elem < numeric_limits<unsigned short>::max())
return 1;
return 2;
}
@@ -486,7 +486,7 @@ private:
return __result{{_VSTD::forward<_Fs>(__fs)...}};
}
- template <std::size_t... _Is>
+ template <size_t... _Is>
struct __dispatcher {
template <class _Fp, class... _Vs>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1108,7 +1108,7 @@ struct __narrowing_check {
template <class _Dest>
static auto __test_impl(_Dest (&&)[1]) -> __identity<_Dest>;
template <class _Dest, class _Source>
- using _Apply _LIBCPP_NODEBUG_TYPE = decltype(__test_impl<_Dest>({std::declval<_Source>()}));
+ using _Apply _LIBCPP_NODEBUG_TYPE = decltype(__test_impl<_Dest>({_VSTD::declval<_Source>()}));
};
template <class _Dest, class _Source>
@@ -1514,7 +1514,7 @@ template <class _Operator>
struct __convert_to_bool {
template <class _T1, class _T2>
_LIBCPP_INLINE_VISIBILITY constexpr bool operator()(_T1 && __t1, _T2&& __t2) const {
- static_assert(std::is_convertible<decltype(_Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2))), bool>::value,
+ static_assert(is_convertible<decltype(_Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2))), bool>::value,
"the relational operator does not return a type which is implicitly convertible to bool");
return _Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2));
}
diff --git a/libcxx/include/vector b/libcxx/include/vector
index bc83656db12a..e70931f5fde0 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -454,7 +454,7 @@ inline _LIBCPP_INLINE_VISIBILITY
__vector_base<_Tp, _Allocator>::__vector_base(allocator_type&& __a) _NOEXCEPT
: __begin_(nullptr),
__end_(nullptr),
- __end_cap_(nullptr, std::move(__a)) {}
+ __end_cap_(nullptr, _VSTD::move(__a)) {}
#endif
template <class _Tp, class _Allocator>
@@ -931,7 +931,7 @@ private:
#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
template<class _InputIterator,
- class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>,
+ class _Alloc = allocator<typename iterator_traits<_InputIterator>::value_type>,
class = typename enable_if<__is_allocator<_Alloc>::value, void>::type
>
vector(_InputIterator, _InputIterator)
@@ -2880,7 +2880,7 @@ inline _LIBCPP_INLINE_VISIBILITY vector<bool, _Allocator>::vector(vector&& __v)
#endif
: __begin_(__v.__begin_),
__size_(__v.__size_),
- __cap_alloc_(std::move(__v.__cap_alloc_)) {
+ __cap_alloc_(_VSTD::move(__v.__cap_alloc_)) {
__v.__begin_ = nullptr;
__v.__size_ = 0;
__v.__cap() = 0;
More information about the llvm-branch-commits
mailing list