Update fmt_helper.h

This commit is contained in:
Gabi Melman 2018-11-27 11:37:09 +02:00 committed by GitHub
parent cff78f5833
commit b492642282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@ inline void pad2(int n, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
template<typename T, size_t Buffer_Size> template<typename T, size_t Buffer_Size>
inline void pad_uint(T n, unsigned int width, fmt::basic_memory_buffer<char, Buffer_Size> &dest) inline void pad_uint(T n, unsigned int width, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
{ {
static_assert(std::is_unsigned<T>::value, "append_uint must get unsigned T"); static_assert(std::is_unsigned<T>::value, "pad_uint must get unsigned T");
auto digits = count_digits(n); auto digits = count_digits(n);
if (width > digits) if (width > digits)
{ {