int_traits -> uint32_or_64_t

This commit is contained in:
Victor Zverovich
2019-07-03 16:01:21 -07:00
parent 1289782f06
commit c286ffc88d
4 changed files with 10 additions and 15 deletions
+1 -2
View File
@@ -579,8 +579,7 @@ struct chrono_formatter {
void write(Rep value, int width) {
write_sign();
if (isnan(value)) return write_nan();
typedef typename int_traits<int>::main_type main_type;
main_type n = to_unsigned(
uint32_or_64_t<int> n = to_unsigned(
to_nonnegative_int(value, (std::numeric_limits<int>::max)()));
int num_digits = internal::count_digits(n);
if (width > num_digits) out = std::fill_n(out, width - num_digits, '0');