diff --git a/include/fmt/core.h b/include/fmt/core.h index 4dcf428b..0bb974d9 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1779,7 +1779,7 @@ inline std::back_insert_iterator format_to( } template > -inline std::basic_string vformat( +FMT_INLINE std::basic_string vformat( const S& format_str, basic_format_args>> args) { return internal::vformat(to_string_view(format_str), args); @@ -1798,7 +1798,7 @@ 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 > -inline std::basic_string format(const S& format_str, Args&&... args) { +FMT_INLINE std::basic_string format(const S& format_str, Args&&... args) { const auto& vargs = internal::make_args_checked(format_str, args...); return internal::vformat(to_string_view(format_str), vargs); } diff --git a/include/fmt/format.h b/include/fmt/format.h index 80b464ea..6b43aeac 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3402,6 +3402,11 @@ typename buffer_context::iterator internal::vformat_to( args); } +#ifndef FMT_HEADER_ONLY +extern template format_context::iterator internal::vformat_to( + internal::buffer&, string_view, basic_format_args); +#endif + template , FMT_ENABLE_IF(internal::is_string::value)> inline typename buffer_context::iterator vformat_to( @@ -3512,7 +3517,7 @@ inline format_to_n_result format_to_n(OutputIt out, std::size_t n, } template -inline std::basic_string internal::vformat( +std::basic_string internal::vformat( basic_string_view format_str, basic_format_args>> args) { basic_memory_buffer buffer;