Automated Code Change

PiperOrigin-RevId: 936635684
Change-Id: I3b1bfa2ef921cdc3d0aaa1fc95986b64a9ad0282
This commit is contained in:
Abseil Team
2026-06-23 06:45:04 -07:00
committed by Copybara-Service
parent aa40ee603e
commit 8b53336594
@@ -194,11 +194,11 @@ using LosslessArithmeticConvertibleImpl = std::integral_constant<
// Converting between integers of different widths is allowed so long
// as the conversion does not go from signed to unsigned.
(((sizeof(From) < sizeof(To)) &&
!(std::is_signed<From>::value && !std::is_signed<To>::value)) ||
!(std::is_signed_v<From> && !std::is_signed_v<To>)) ||
// Converting between integers of the same width only requires the
// two types to have the same signedness.
((sizeof(From) == sizeof(To)) &&
(std::is_signed<From>::value == std::is_signed<To>::value)))
(std::is_signed_v<From> == std::is_signed_v<To>)))
) ? true
// Floating point conversions are lossless if and only if `To` is at least
// as wide as `From`.
@@ -364,7 +364,7 @@ class [[nodiscard]] StlContainerView {
typedef const type& const_reference;
static const_reference ConstReference(const RawContainer& container) {
static_assert(!std::is_const<RawContainer>::value,
static_assert(!std::is_const_v<RawContainer>,
"RawContainer type must not be const");
return container;
}
@@ -385,7 +385,7 @@ class [[nodiscard]] StlContainerView<Element[N]> {
typedef const type const_reference;
static const_reference ConstReference(const Element (&array)[N]) {
static_assert(std::is_same<Element, RawElement>::value,
static_assert(std::is_same_v<Element, RawElement>,
"Element type must not be const");
return type(array, N, RelationToSourceReference());
}
@@ -447,14 +447,13 @@ auto ApplyImpl(F&& f, Tuple&& args, std::index_sequence<Idx...>)
// Apply the function to a tuple of arguments.
template <typename F, typename Tuple>
auto Apply(F&& f, Tuple&& args)
-> decltype(ApplyImpl(
std::forward<F>(f), std::forward<Tuple>(args),
std::make_index_sequence<std::tuple_size<
typename std::remove_reference<Tuple>::type>::value>())) {
auto Apply(F&& f, Tuple&& args) -> decltype(ApplyImpl(
std::forward<F>(f), std::forward<Tuple>(args),
std::make_index_sequence<
std::tuple_size_v<std::remove_reference_t<Tuple>>>())) {
return ApplyImpl(std::forward<F>(f), std::forward<Tuple>(args),
std::make_index_sequence<std::tuple_size<
typename std::remove_reference<Tuple>::type>::value>());
std::make_index_sequence<
std::tuple_size_v<std::remove_reference_t<Tuple>>>());
}
// Template struct Function<F>, where F must be a function type, contains
@@ -490,7 +489,7 @@ struct Function<R(Args...)> {
// See: https://github.com/google/googletest/issues/3931
// Can be replaced with std::tuple_element_t in C++14.
template <size_t I, typename T>
using TupleElement = typename std::tuple_element<I, T>::type;
using TupleElement = std::tuple_element_t<I, T>;
bool Base64Unescape(const std::string& encoded, std::string* decoded);