From 27d8a0e302c26153b1611c65f4c233ef5db0ba32 Mon Sep 17 00:00:00 2001 From: Dekken Date: Sun, 28 Jun 2020 03:28:24 +0200 Subject: [PATCH] Refactor to allow MSVC without #define NOMINMAX (#905) --- include/yaml-cpp/node/convert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index bbe0b7d..34ca898 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -120,8 +120,8 @@ typename std::enable_if<(std::is_same::value || ConvertStreamTo(std::stringstream& stream, T& rhs) { int num; if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) { - if (num >= std::numeric_limits::min() && - num <= std::numeric_limits::max()) { + if (num >= (std::numeric_limits::min)() && + num <= (std::numeric_limits::max)()) { rhs = num; return true; }