Skip to content

Commit

Permalink
fmt 7.0.0 renamed the internal namespace to detail.
Browse files Browse the repository at this point in the history
  • Loading branch information
candrews committed Jul 6, 2020
1 parent 39150eb commit 22bee81
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion include/spdlog/details/fmt_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 22bee81

Please sign in to comment.