Fix clang build

This commit is contained in:
Victor Zverovich 2015-03-01 18:19:56 -08:00
parent 91a7ee6c20
commit 7c0d5756ff
2 changed files with 10 additions and 3 deletions

View File

@ -611,6 +611,11 @@ class fmt::internal::ArgFormatter :
}
};
template <typename Char>
void fmt::internal::FixedBuffer<Char>::grow(std::size_t) {
FMT_THROW(std::runtime_error("buffer overflow"));
}
template <typename Char>
template <typename StrChar>
void fmt::BasicWriter<Char>::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<char>::grow(std::size_t);
template const char *fmt::BasicFormatter<char>::format(
const char *&format_str, const fmt::internal::Arg &arg);
@ -1135,6 +1142,8 @@ template int fmt::internal::CharTraits<char>::format_float(
// Explicit instantiations for wchar_t.
template void fmt::internal::FixedBuffer<wchar_t>::grow(std::size_t);
template const wchar_t *fmt::BasicFormatter<wchar_t>::format(
const wchar_t *&format_str, const fmt::internal::Arg &arg);

View File

@ -444,9 +444,7 @@ class FixedBuffer : public fmt::internal::Buffer<Char> {
: fmt::internal::Buffer<Char>(array, size) {}
protected:
void grow(std::size_t size) {
throw std::runtime_error("buffer overflow");
}
void grow(std::size_t size);
};
#ifndef _MSC_VER