From 0642af2e992b76a1b51537baac610e3883b0c09e Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 30 Nov 2021 18:42:40 +0000 Subject: [PATCH] Explictly suppress unsigned unary minus warning on MSVC in IntFromChars --- src/string_func_extra.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/string_func_extra.h b/src/string_func_extra.h index c6df7ab588..f2729ed70d 100644 --- a/src/string_func_extra.h +++ b/src/string_func_extra.h @@ -73,7 +73,14 @@ inline bool IntFromChars(const char* first, const char* last, T& value) } if (start == first) return false; if (std::is_signed::value) { +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable: 4146) +#endif value = negative ? -out : out; +#ifdef _MSC_VER +#pragma warning(pop) +#endif } else { value = out; }