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); }