Explictly suppress unsigned unary minus warning on MSVC in IntFromChars

This commit is contained in:
Jonathan G Rennison
2021-11-30 18:42:40 +00:00
parent 3ef6b29f4a
commit 0642af2e99

View File

@@ -73,7 +73,14 @@ inline bool IntFromChars(const char* first, const char* last, T& value)
}
if (start == first) return false;
if (std::is_signed<T>::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;
}