From d0c433455801e1c1fb6f486f0b447e22f946ab52 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 14 Aug 2020 12:57:11 -0700 Subject: Export of internal Abseil changes -- daabc2a08b55696424add36e8fd6ed0ab397dadc by Derek Mauro : Internal change PiperOrigin-RevId: 326713082 GitOrigin-RevId: daabc2a08b55696424add36e8fd6ed0ab397dadc Change-Id: Ibe91394988bc3bcfaae7ac16bdc1e9b5dfd16588 --- absl/base/casts.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/absl/base/casts.h b/absl/base/casts.h index 322cc1d2..83c69126 100644 --- a/absl/base/casts.h +++ b/absl/base/casts.h @@ -159,16 +159,19 @@ inline Dest bit_cast(const Source& source) { return dest; } -// NOTE: This overload is only picked if the requirements of bit_cast are not -// met. It is therefore UB, but is provided temporarily as previous versions of -// this function template were unchecked. Do not use this in new code. +// NOTE: This overload is only picked if the requirements of bit_cast are +// not met. It is therefore UB, but is provided temporarily as previous +// versions of this function template were unchecked. Do not use this in +// new code. template < typename Dest, typename Source, typename std::enable_if< - !internal_casts::is_bitcastable::value, int>::type = 0> + !internal_casts::is_bitcastable::value, + int>::type = 0> ABSL_DEPRECATED( - "absl::bit_cast type requirements were violated. Update the types being " - "used such that they are the same size and are both TriviallyCopyable.") + "absl::bit_cast type requirements were violated. Update the types " + "being used such that they are the same size and are both " + "TriviallyCopyable.") inline Dest bit_cast(const Source& source) { static_assert(sizeof(Dest) == sizeof(Source), "Source and destination types should have equal sizes."); -- cgit v1.2.3