diff --git a/include/fmt/format.h b/include/fmt/format.h index 43403027ba1c..fdb2cf442a4c 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1523,7 +1523,7 @@ auto find_escape(const Char* begin, const Char* end) -> find_escape_result { for (; begin != end; ++begin) { uint32_t cp = static_cast>(*begin); - if (sizeof(Char) == 1 && cp >= 0x80) continue; + if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; if (needs_escape(cp)) return {begin, begin + 1, cp}; } return {begin, nullptr, 0};