Don't do explicit instantiation in the header-only mode

This commit is contained in:
Victor Zverovich 2015-03-01 09:43:33 -08:00
parent a8a7534f78
commit c09c42f9a7

View File

@ -1112,6 +1112,8 @@ FMT_FUNC int fmt::fprintf(std::FILE *f, StringRef format, ArgList args) {
return std::fwrite(w.data(), 1, size, f) < size ? -1 : static_cast<int>(size); return std::fwrite(w.data(), 1, size, f) < size ? -1 : static_cast<int>(size);
} }
#ifndef FMT_HEADER_ONLY
// Explicit instantiations for char. // Explicit instantiations for char.
template const char *fmt::BasicFormatter<char>::format( template const char *fmt::BasicFormatter<char>::format(
@ -1151,6 +1153,8 @@ template int fmt::internal::CharTraits<wchar_t>::format_float(
wchar_t *buffer, std::size_t size, const wchar_t *format, wchar_t *buffer, std::size_t size, const wchar_t *format,
unsigned width, int precision, long double value); unsigned width, int precision, long double value);
#endif // FMT_HEADER_ONLY
#if _MSC_VER #if _MSC_VER
# pragma warning(pop) # pragma warning(pop)
#endif #endif