Merge pull request #919 from DanielChabrowski/fix-compilation

Fix template error
This commit is contained in:
Gabi Melman 2018-11-19 20:02:24 +02:00 committed by GitHub
commit f1ab6feba2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ inline void append_int(T n, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
template<typename T> template<typename T>
inline unsigned count_digits(T n) inline unsigned count_digits(T n)
{ {
using count_type = std::conditional<(sizeof(T) > sizeof(std::uint32_t)), std::uint64_t, std::uint32_t>::type; using count_type = typename std::conditional<(sizeof(T) > sizeof(std::uint32_t)), std::uint64_t, std::uint32_t>::type;
return fmt::internal::count_digits(static_cast<count_type>(n)); return fmt::internal::count_digits(static_cast<count_type>(n));
} }