summaryrefslogtreecommitdiff
path: root/absl/base/casts.h
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2020-09-25 17:10:06 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2020-09-25 17:10:06 -0400
commit4e1c98fe594d99494ce26e94a77f0358705f227c (patch)
treea07e9daefa3b5acf716ce89fa1a1c9b500fde795 /absl/base/casts.h
parent7a1e14d0d29736ba9c2884d0ce81fc0af92f6ab3 (diff)
parentb56cbdd23834a65682c0b46f367f8679e83bc894 (diff)
Merge new upstream LTS 20200923
Diffstat (limited to 'absl/base/casts.h')
-rw-r--r--absl/base/casts.h15
1 files 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<Dest, Source>::value, int>::type = 0>
+ !internal_casts::is_bitcastable<Dest, Source>::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.");