diff --git a/include/fmt/core.h b/include/fmt/core.h index 6e73481f..e9cea570 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1443,11 +1443,11 @@ inline std::basic_string vformat( std::string message = fmt::format("The answer is {}", 42); \endrst */ -// Use SFINAE instead of static_assert because of color overload of fmt::format. +// Pass fmt::char_t as a default template parameter instead of using +// std::basic_string> to reduce the symbol size. template ::value)> -inline std::basic_string format(const S& format_str, - const Args&... args) { + typename Char = enable_if_t::value, char_t>> +inline std::basic_string format(const S& format_str, const Args&... args) { return internal::vformat(to_string_view(format_str), {internal::make_args_checked(format_str, args...)}); }