Improve compile time by using extern template (#1452)

This commit is contained in:
Victor Zverovich
2020-04-23 14:52:50 -07:00
parent cb475cb884
commit 6f435f55c8
2 changed files with 8 additions and 3 deletions

View File

@@ -1779,7 +1779,7 @@ inline std::back_insert_iterator<Container> format_to(
}
template <typename S, typename Char = char_t<S>>
inline std::basic_string<Char> vformat(
FMT_INLINE std::basic_string<Char> vformat(
const S& format_str,
basic_format_args<buffer_context<type_identity_t<Char>>> args) {
return internal::vformat(to_string_view(format_str), args);
@@ -1798,7 +1798,7 @@ inline std::basic_string<Char> vformat(
// Pass char_t as a default template parameter instead of using
// std::basic_string<char_t<S>> to reduce the symbol size.
template <typename S, typename... Args, typename Char = char_t<S>>
inline std::basic_string<Char> format(const S& format_str, Args&&... args) {
FMT_INLINE std::basic_string<Char> format(const S& format_str, Args&&... args) {
const auto& vargs = internal::make_args_checked<Args...>(format_str, args...);
return internal::vformat(to_string_view(format_str), vargs);
}