Skip to content

Commit 5863e9b

Browse files
committed
refactor to allow MSVC without #define NOMINMAX
1 parent 97d1ae5 commit 5863e9b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/yaml-cpp/node/convert.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,16 @@ typename std::enable_if<(std::is_same<T, unsigned char>::value ||
120120
ConvertStreamTo(std::stringstream& stream, T& rhs) {
121121
int num;
122122
if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) {
123-
if (num >= std::numeric_limits<T>::min() &&
124-
num <= std::numeric_limits<T>::max()) {
123+
if (num >= (std::numeric_limits<T>::min)() &&
124+
num <= (std::numeric_limits<T>::max)()) {
125125
rhs = num;
126126
return true;
127127
}
128128
}
129129
return false;
130130
}
131131

132+
132133
template <typename T>
133134
typename std::enable_if<!(std::is_same<T, unsigned char>::value ||
134135
std::is_same<T, signed char>::value), bool>::type

0 commit comments

Comments
 (0)