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

@@ -3402,6 +3402,11 @@ typename buffer_context<Char>::iterator internal::vformat_to(
args);
}
#ifndef FMT_HEADER_ONLY
extern template format_context::iterator internal::vformat_to(
internal::buffer<char>&, string_view, basic_format_args<format_context>);
#endif
template <typename S, typename Char = char_t<S>,
FMT_ENABLE_IF(internal::is_string<S>::value)>
inline typename buffer_context<Char>::iterator vformat_to(
@@ -3512,7 +3517,7 @@ inline format_to_n_result<OutputIt> format_to_n(OutputIt out, std::size_t n,
}
template <typename Char>
inline std::basic_string<Char> internal::vformat(
std::basic_string<Char> internal::vformat(
basic_string_view<Char> format_str,
basic_format_args<buffer_context<type_identity_t<Char>>> args) {
basic_memory_buffer<Char> buffer;