[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/future b/include/future
index 409fa8e..6e755c8 100644
--- a/include/future
+++ b/include/future
@@ -1055,7 +1055,7 @@
_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 @@
_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 @@
_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 @@
_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 @@
_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 @@
_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 @@
_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 @@
_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 @@
_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;
}