diff options
author | Lawrence Wolf-Sonkin <lawrencews@google.com> | 2023-12-28 14:26:18 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-12-28 14:27:14 -0800 |
commit | 6a19ff47352a2112e953f4ab813d820e0ecfe1e3 (patch) | |
tree | d0b376cb1109364175b38d300069bafb618e5cdd /absl/types | |
parent | 1ac355bbb7e1e3c7916d812976127cf15c411bd3 (diff) | |
download | abseil-6a19ff47352a2112e953f4ab813d820e0ecfe1e3.tar.gz abseil-6a19ff47352a2112e953f4ab813d820e0ecfe1e3.tar.bz2 abseil-6a19ff47352a2112e953f4ab813d820e0ecfe1e3.zip |
[absl] Rename `absl::internal::identity` to `absl::internal::type_identity`
* Also does this for `absl::internal::identity_t` which is now `absl::internal::type_identity_t`
* This is clearer naming as this is a backfill of `std::type_identity` (the identity type), and not `std::identity` (the identity function)
PiperOrigin-RevId: 594316002
Change-Id: I5fb8cf7e3d07c1bc736cbecd202e7d556b6ea33e
Diffstat (limited to 'absl/types')
-rw-r--r-- | absl/types/internal/variant.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/types/internal/variant.h b/absl/types/internal/variant.h index fc8829e5..263d7b09 100644 --- a/absl/types/internal/variant.h +++ b/absl/types/internal/variant.h @@ -1047,11 +1047,11 @@ class VariantStateBase { std::size_t index_; }; -using absl::internal::identity; +using absl::internal::type_identity; // OverloadSet::Overload() is a unary function which is overloaded to // take any of the element types of the variant, by reference-to-const. -// The return type of the overload on T is identity<T>, so that you +// The return type of the overload on T is type_identity<T>, so that you // can statically determine which overload was called. // // Overload() is not defined, so it can only be called in unevaluated @@ -1062,7 +1062,7 @@ struct OverloadSet; template <typename T, typename... Ts> struct OverloadSet<T, Ts...> : OverloadSet<Ts...> { using Base = OverloadSet<Ts...>; - static identity<T> Overload(const T&); + static type_identity<T> Overload(const T&); using Base::Overload; }; |