We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0166f45 commit ddf0b7dCopy full SHA for ddf0b7d
include/fmt/printf.h
@@ -60,7 +60,7 @@ namespace detail {
60
// signed and unsigned integers.
61
template <bool IsSigned> struct int_checker {
62
template <typename T> static auto fits_in_int(T value) -> bool {
63
- unsigned max = max_value<int>();
+ unsigned max = to_unsigned(max_value<int>());
64
return value <= max;
65
}
66
static auto fits_in_int(bool) -> bool { return true; }
@@ -205,7 +205,7 @@ class printf_width_handler {
205
specs_.align = align::left;
206
width = 0 - width;
207
208
- unsigned int_max = max_value<int>();
+ unsigned int_max = to_unsigned(max_value<int>());
209
if (width > int_max) report_error("number is too big");
210
return static_cast<unsigned>(width);
211
0 commit comments