Fix build issues under C++11

This commit is contained in:
Charless Milette
2021-11-13 12:02:40 -05:00
parent 6ff1b83038
commit 89c4b1aabe
3 changed files with 8 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ template<typename T>
inline void append_int(T n, memory_buf_t &dest)
{
// Buffer should be large enough to hold all digits (digits10 + 1) and a sign
SPDLOG_CONSTEXPR auto BUF_SIZE = std::numeric_limits<T>::digits10 + 2;
SPDLOG_CONSTEXPR const auto BUF_SIZE = std::numeric_limits<T>::digits10 + 2;
char buf[BUF_SIZE];
auto [ptr, ec] = std::to_chars(buf, buf + BUF_SIZE, n, 10);