From c1a80b81464dbaccccb0fdde257afd5b40ad6531 Mon Sep 17 00:00:00 2001 From: Eladash Date: Wed, 15 Jul 2020 16:02:12 +0300 Subject: [PATCH] Minor fixup after #8501 --- Utilities/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/types.h b/Utilities/types.h index 06bf7d5977..63cbb96610 100644 --- a/Utilities/types.h +++ b/Utilities/types.h @@ -94,7 +94,7 @@ namespace std { static_assert(sizeof(To) == sizeof(From), "std::bit_cast<>: incompatible type size"); - if constexpr (std::is_same_v, std::remove_const_t> || (std::is_integral_v && std::is_integral_v)) + if constexpr ((std::is_same_v, std::remove_const_t> && std::is_constructible_v) || (std::is_integral_v && std::is_integral_v)) { return static_cast(from); } @@ -1057,4 +1057,4 @@ inline constexpr uintmax_t ceil2(T value) return i + std::min(ispow2, 1); } } -} \ No newline at end of file +}