[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/vector b/include/vector
index bc83656..e70931f 100644
--- a/include/vector
+++ b/include/vector
@@ -454,7 +454,7 @@
__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 @@
#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 @@
#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;