[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/random b/include/random
index 32f9148..3cb2d30 100644
--- a/include/random
+++ b/include/random
@@ -4660,7 +4660,7 @@
{
__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 @@
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 @@
__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 @@
}
}
}
- return std::__clamp_to_integral<result_type>(__tx);
+ return _VSTD::__clamp_to_integral<result_type>(__tx);
}
template <class _CharT, class _Traits, class _IntType>