Skip to content

Commit

Permalink
Merge pull request #1606 from candrews/fmt-7
Browse files Browse the repository at this point in the history
fmt 7.0.0 renamed the internal namespace to detail.
  • Loading branch information
gabime authored Jul 6, 2020
2 parents 39150eb + 22bee81 commit c62ba5f
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 c62ba5f

Please sign in to comment.