diff --git a/include/fmt/core.h b/include/fmt/core.h index 7c37837c..d32e886d 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -660,6 +660,7 @@ template class buffer { protected: // Don't initialize ptr_ since it is not accessed to save a few cycles. + FMT_SUPPRESS_MSC_WARNING(26495) buffer(std::size_t sz) FMT_NOEXCEPT : size_(sz), capacity_(sz) {} buffer(T* p = nullptr, std::size_t sz = 0, std::size_t cap = 0) FMT_NOEXCEPT diff --git a/include/fmt/format.h b/include/fmt/format.h index 7648c257..355329a4 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1640,7 +1640,7 @@ template class basic_writer { UIntPtr value; int num_digits; - size_t size() const { return to_unsigned(num_digits) + 2; } + size_t size() const { return to_unsigned(num_digits) + size_t(2); } size_t width() const { return size(); } template void operator()(It&& it) const {