Skip to content

Commit

Permalink
Refactor to allow MSVC without #define NOMINMAX (jbeder#905)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan authored Jun 28, 2020
1 parent 97d1ae5 commit 27d8a0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/yaml-cpp/node/convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ typename std::enable_if<(std::is_same<T, unsigned char>::value ||
ConvertStreamTo(std::stringstream& stream, T& rhs) {
int num;
if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) {
if (num >= std::numeric_limits<T>::min() &&
num <= std::numeric_limits<T>::max()) {
if (num >= (std::numeric_limits<T>::min)() &&
num <= (std::numeric_limits<T>::max)()) {
rhs = num;
return true;
}
Expand Down

0 comments on commit 27d8a0e

Please sign in to comment.