diff --git a/fmt/format.h b/fmt/format.h index 72e7c1bf3a06..cd53b621a9f4 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -742,7 +742,7 @@ template template void Buffer::append(const U *begin, const U *end) { FMT_ASSERT(end >= begin, "negative value"); - std::size_t new_size = size_ + (end - begin); + std::size_t new_size = size_ + static_cast(end - begin); if (new_size > capacity_) grow(new_size); std::uninitialized_copy(begin, end,