diff --git a/include/fmt/core.h b/include/fmt/core.h index be0b6a880798..f194a4dc0df3 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -395,9 +395,9 @@ FMT_CONSTEXPR auto to_unsigned(Int value) -> return static_cast::type>(value); } -FMT_MSC_WARNING(suppress : 4566) constexpr unsigned char section[] = "\u00A7"; +FMT_CONSTEXPR inline auto is_utf8() -> bool { + FMT_MSC_WARNING(suppress : 4566) constexpr unsigned char section[] = "\u00A7"; -constexpr auto is_utf8() -> bool { // Avoid buggy sign extensions in MSVC's constant evaluation mode (#2297). using uchar = unsigned char; return FMT_UNICODE || (sizeof(section) == 3 && uchar(section[0]) == 0xC2 &&