From 7c0d5756ffebf501d564f462c464363c6d8f72e7 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 1 Mar 2015 18:19:56 -0800 Subject: [PATCH] Fix clang build --- format.cc | 9 +++++++++ format.h | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/format.cc b/format.cc index 76f22830..f0ee1a35 100644 --- a/format.cc +++ b/format.cc @@ -611,6 +611,11 @@ class fmt::internal::ArgFormatter : } }; +template +void fmt::internal::FixedBuffer::grow(std::size_t) { + FMT_THROW(std::runtime_error("buffer overflow")); +} + template template void fmt::BasicWriter::write_str( @@ -1116,6 +1121,8 @@ FMT_FUNC int fmt::fprintf(std::FILE *f, StringRef format, ArgList args) { // Explicit instantiations for char. +template void fmt::internal::FixedBuffer::grow(std::size_t); + template const char *fmt::BasicFormatter::format( const char *&format_str, const fmt::internal::Arg &arg); @@ -1135,6 +1142,8 @@ template int fmt::internal::CharTraits::format_float( // Explicit instantiations for wchar_t. +template void fmt::internal::FixedBuffer::grow(std::size_t); + template const wchar_t *fmt::BasicFormatter::format( const wchar_t *&format_str, const fmt::internal::Arg &arg); diff --git a/format.h b/format.h index 67f7b920..de94b622 100644 --- a/format.h +++ b/format.h @@ -444,9 +444,7 @@ class FixedBuffer : public fmt::internal::Buffer { : fmt::internal::Buffer(array, size) {} protected: - void grow(std::size_t size) { - throw std::runtime_error("buffer overflow"); - } + void grow(std::size_t size); }; #ifndef _MSC_VER