From 08a65c22820a15eeadef844a921b4517ba062466 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 10 Oct 2018 17:31:21 -0700 Subject: [PATCH] Workaround broken constexpr in MSVC2017 --- include/fmt/format.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 9fd3fa44..f232be54 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1583,7 +1583,8 @@ FMT_CONSTEXPR unsigned parse_nonnegative_int( value = max_int + 1; break; } - value = value * 10 + unsigned(*begin++ - '0'); + value = value * 10 + unsigned(*begin - '0'); + ++begin; } while (begin != end && '0' <= *begin && *begin <= '9'); if (value > max_int) eh.on_error("number is too big");