Skip to content

Commit

Permalink
fix: compile error on Emscripten toolchain
Browse files Browse the repository at this point in the history
Backport fmtlib#4187 to 11.0.2
See: fmtlib#4218
  • Loading branch information
jiulongw committed Nov 6, 2024
1 parent 0c9fce2 commit 2987adf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -2877,11 +2877,12 @@ template <typename Char, typename... Args> class basic_format_string {
std::is_reference<Args>::value)...>() == 0,
"passing views as lvalues is disallowed");
#if FMT_USE_CONSTEVAL
auto sv = string_view(str_);
if constexpr (detail::count_named_args<Args...>() ==
detail::count_statically_named_args<Args...>()) {
using checker =
detail::format_string_checker<Char, remove_cvref_t<Args>...>;
detail::parse_format_string<true>(str_, checker(s));
detail::parse_format_string<true>(sv, checker(sv));
}
#else
detail::check_format_string<Args...>(s);
Expand Down

0 comments on commit 2987adf

Please sign in to comment.