[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
GitOrigin-RevId: d586f92c9456a972ee475a021525c0522b89587b
diff --git a/include/functional b/include/functional
index 0979e7d..22c73c5 100644
--- a/include/functional
+++ b/include/functional
@@ -1592,7 +1592,7 @@
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 _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 @@
function<_Rp(_ArgTypes...)>&
function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
{
- __f_ = std::move(__f.__f_);
+ __f_ = _VSTD::move(__f.__f_);
return *this;
}