From 55de7357c7f0e1af6bb7d61b924a9a9315cc1e81 Mon Sep 17 00:00:00 2001 From: Dino Radakovic Date: Fri, 2 Jun 2023 11:57:32 -0700 Subject: `absl`: Replace `absl::remove_cv_t>` with `absl::remove_cvref_t` PiperOrigin-RevId: 537372070 Change-Id: I46ff6e42856aea2cd8da6ff7105cf58613603dd4 --- absl/status/internal/statusor_internal.h | 36 +++++++++++--------------------- absl/status/statusor.h | 8 +++---- 2 files changed, 15 insertions(+), 29 deletions(-) (limited to 'absl') diff --git a/absl/status/internal/statusor_internal.h b/absl/status/internal/statusor_internal.h index eaac2c0b..49cead7a 100644 --- a/absl/status/internal/statusor_internal.h +++ b/absl/status/internal/statusor_internal.h @@ -69,11 +69,8 @@ using IsConstructibleOrConvertibleOrAssignableFromStatusOr = template struct IsDirectInitializationAmbiguous : public absl::conditional_t< - std::is_same>, - U>::value, - std::false_type, - IsDirectInitializationAmbiguous< - T, absl::remove_cv_t>>> {}; + std::is_same, U>::value, std::false_type, + IsDirectInitializationAmbiguous>> {}; template struct IsDirectInitializationAmbiguous> @@ -84,14 +81,11 @@ struct IsDirectInitializationAmbiguous> template using IsDirectInitializationValid = absl::disjunction< // Short circuits if T is basically U. - std::is_same>>, + std::is_same>, absl::negation, - absl::remove_cv_t>>, - std::is_same>>, - std::is_same>>, + std::is_same, absl::remove_cvref_t>, + std::is_same>, + std::is_same>, IsDirectInitializationAmbiguous>>>; // This trait detects whether `StatusOr::operator=(U&&)` is ambiguous, which @@ -107,11 +101,8 @@ using IsDirectInitializationValid = absl::disjunction< template struct IsForwardingAssignmentAmbiguous : public absl::conditional_t< - std::is_same>, - U>::value, - std::false_type, - IsForwardingAssignmentAmbiguous< - T, absl::remove_cv_t>>> {}; + std::is_same, U>::value, std::false_type, + IsForwardingAssignmentAmbiguous>> {}; template struct IsForwardingAssignmentAmbiguous> @@ -122,14 +113,11 @@ struct IsForwardingAssignmentAmbiguous> template using IsForwardingAssignmentValid = absl::disjunction< // Short circuits if T is basically U. - std::is_same>>, + std::is_same>, absl::negation, - absl::remove_cv_t>>, - std::is_same>>, - std::is_same>>, + std::is_same, absl::remove_cvref_t>, + std::is_same>, + std::is_same>, IsForwardingAssignmentAmbiguous>>>; class Helper { diff --git a/absl/status/statusor.h b/absl/status/statusor.h index 935366d5..54c7ce02 100644 --- a/absl/status/statusor.h +++ b/absl/status/statusor.h @@ -411,7 +411,7 @@ class StatusOr : private internal_statusor::StatusOrData, typename = typename std::enable_if, std::is_assignable, absl::disjunction< - std::is_same>, T>, + std::is_same, T>, absl::conjunction< absl::negation>, absl::negation, internal_statusor::IsDirectInitializationValid, std::is_constructible, std::is_convertible, absl::disjunction< - std::is_same>, - T>, + std::is_same, T>, absl::conjunction< absl::negation>, absl::negation< @@ -461,8 +460,7 @@ class StatusOr : private internal_statusor::StatusOrData, absl::conjunction< internal_statusor::IsDirectInitializationValid, absl::disjunction< - std::is_same>, - T>, + std::is_same, T>, absl::conjunction< absl::negation>, absl::negation< -- cgit v1.2.3