diff --git a/cppformat/format.cc b/cppformat/format.cc index f30d5f2d..92ffde8d 100644 --- a/cppformat/format.cc +++ b/cppformat/format.cc @@ -366,8 +366,8 @@ class CharConverter : public fmt::internal::ArgVisitor { // Write the content of w to os. void write(std::ostream &os, fmt::MemoryWriter &w) { const char *data = w.data(); - std::size_t size = w.size(); typedef internal::MakeUnsigned::Type UnsignedStreamSize; + UnsignedStreamSize size = w.size(); UnsignedStreamSize max_size = internal::to_unsigned((std::numeric_limits::max)()); do {