From b7241f45c326262af91878516ea03a01076523a5 Mon Sep 17 00:00:00 2001 From: dekken Date: Thu, 25 Jun 2020 23:04:26 +0200 Subject: [PATCH] refactor to allow MSVC without #define NOMINMAX --- 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; }