diff --git a/include/fmt/core.h b/include/fmt/core.h index 0d7d15b5..c8b987af 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1409,7 +1409,8 @@ inline std::basic_string vformat( */ // Pass char_t as a default template parameter instead of using // std::basic_string> to reduce the symbol size. -template > +template , + FMT_ENABLE_IF(internal::is_string::value)> inline std::basic_string format(const S& format_str, Args&&... args) { return internal::vformat( to_string_view(format_str), diff --git a/include/fmt/format.h b/include/fmt/format.h index e198233b..11da7a76 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3351,7 +3351,8 @@ inline typename buffer_context::iterator vformat_to( } template ::value, char_t>> + typename Char = char_t, + FMT_ENABLE_IF(internal::is_string::value)> inline typename buffer_context::iterator format_to( basic_memory_buffer& buf, const S& format_str, Args&&... args) { internal::check_format_string(format_str);