From 9f8a44c98235d386faaa16907fc6e7b6137d2f47 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 15 Jul 2018 19:06:47 -0400 Subject: [PATCH] cast_util: Remove unnecessary typename Given we use std::aligned_storage_t, we don't need to specify typename here. If we used std::aligned_storage, then we would need to. --- src/common/cast_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/cast_util.h b/src/common/cast_util.h index 5a756b5c..1787cbd4 100644 --- a/src/common/cast_util.h +++ b/src/common/cast_util.h @@ -18,7 +18,7 @@ inline Dest BitCast(const Source& source) { static_assert(std::is_trivially_copyable_v, "destination type must be trivially copyable."); static_assert(std::is_trivially_copyable_v, "source type must be trivially copyable"); - typename std::aligned_storage_t dest; + std::aligned_storage_t dest; std::memcpy(&dest, &source, sizeof(dest)); return reinterpret_cast(dest); } @@ -30,7 +30,7 @@ inline Dest BitCastPointee(const SourcePtr source) { static_assert(sizeof(SourcePtr) == sizeof(void*), "source pointer must have size of a pointer"); static_assert(std::is_trivially_copyable_v, "destination type must be trivially copyable."); - typename std::aligned_storage_t dest; + std::aligned_storage_t dest; std::memcpy(&dest, BitCast(source), sizeof(dest)); return reinterpret_cast(dest); }