From c09c42f9a782511f1223b8c448ae2f4f63fe4ffe Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 1 Mar 2015 09:43:33 -0800 Subject: [PATCH] Don't do explicit instantiation in the header-only mode --- format.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/format.cc b/format.cc index a01e272f..76f22830 100644 --- a/format.cc +++ b/format.cc @@ -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(size); } +#ifndef FMT_HEADER_ONLY + // Explicit instantiations for char. template const char *fmt::BasicFormatter::format( @@ -1151,6 +1153,8 @@ template int fmt::internal::CharTraits::format_float( wchar_t *buffer, std::size_t size, const wchar_t *format, unsigned width, int precision, long double value); +#endif // FMT_HEADER_ONLY + #if _MSC_VER # pragma warning(pop) #endif