From c31fef4d6c9c8ebd6ae3dbd4caf9637d9dfcccdc Mon Sep 17 00:00:00 2001 From: Juraj <37395233+JurajX@users.noreply.github.com> Date: Sun, 20 Feb 2022 20:21:10 +0100 Subject: [PATCH] change static_cast to to_unsigned --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 819fed4a..e9e96647 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -389,7 +389,7 @@ template sizeof(From))> inline auto bit_cast(const From& from) -> To { constexpr auto size = static_cast(sizeof(From) / sizeof(unsigned)); struct data_t { - unsigned value[static_cast(size)]; + unsigned value[to_unsigned(size)]; } data = bit_cast(from); auto result = To(); if (const_check(is_big_endian())) {