1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-01-16 09:47:56 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Gabi Melman
c62ba5f48d
Merge pull request #1606 from candrews/fmt-7
fmt 7.0.0 renamed the internal namespace to detail.
2020-07-06 20:41:13 +03:00
Craig Andrews
22bee8128a fmt 7.0.0 renamed the internal namespace to detail.
See: https://github.com/fmtlib/fmt/issues/1538
2020-07-06 13:01:52 -04:00

View File

@ -34,7 +34,15 @@ template<typename T>
inline unsigned int count_digits(T n)
{
using count_type = typename std::conditional<(sizeof(T) > sizeof(uint32_t)), uint64_t, uint32_t>::type;
return static_cast<unsigned int>(fmt::internal::count_digits(static_cast<count_type>(n)));
return static_cast<unsigned int>(fmt::
// fmt 7.0.0 renamed the internal namespace to detail.
// See: https://github.com/fmtlib/fmt/issues/1538
#if FMT_VERSION < 70000
internal
#else
detail
#endif
::count_digits(static_cast<count_type>(n)));
}
inline void pad2(int n, memory_buf_t &dest)