diff --git a/include/fmt/base.h b/include/fmt/base.h index 2144417673bf..f52dcb578bd2 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -727,7 +727,8 @@ class basic_specs { char fill_data_[max_fill_size] = {' '}; FMT_CONSTEXPR void set_fill_size(size_t size) { - data_ = (data_ & ~fill_size_mask) | (size << fill_size_shift); + data_ = static_cast((data_ & ~fill_size_mask) | + (size << fill_size_shift)); } public: