From e8f8cc8560f9c5009f0519e5aa6b2c58d8966397 Mon Sep 17 00:00:00 2001 From: liuping <369990632@qq.com> Date: Tue, 4 Dec 2018 19:03:18 +0800 Subject: [PATCH] Fix ambiguous complier errorr C2666.The '+' opeator may cause ambiguity. --- include/spdlog/fmt/bundled/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index 9f522f39..e6c1c0af 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3033,7 +3033,7 @@ class format_int { // Formats value in reverse and returns a pointer to the beginning. char *format_decimal(unsigned long long value) { - char *ptr = buffer_ + BUFFER_SIZE - 1; + char *ptr = buffer_ + static_cast(BUFFER_SIZE) - 1; while (value >= 100) { // Integer division is slow so do it for a group of two digits instead // of for every digit. The idea comes from the talk by Alexandrescu