diff --git a/include/fmt/base.h b/include/fmt/base.h index 49868b6d751a..be7a40d52e70 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -2690,16 +2690,16 @@ template struct fstring { static_assert(count<(is_view>::value && std::is_reference::value)...>() == 0, "passing views as lvalues is disallowed"); - if (FMT_USE_CONSTEVAL) parse_format_string(s, checker(s, arg_pack())); + if (FMT_USE_CONSTEVAL) + parse_format_string(str, checker(str, arg_pack())); constexpr bool unused = detail::enforce_compile_checks(); (void)unused; } template ::value)> FMT_CONSTEVAL FMT_ALWAYS_INLINE fstring(const S& s) : str(s) { - auto sv = string_view(str); if (FMT_USE_CONSTEVAL) - detail::parse_format_string(sv, checker(sv, arg_pack())); + detail::parse_format_string(str, checker(str, arg_pack())); constexpr bool unused = detail::enforce_compile_checks(); (void)unused; }