Merge pull request #626 from koemeet/bugfix/vs2017-min-macro-fix

[BugFix] Add parentheses around std::min
This commit is contained in:
Niels Lohmann 2017-06-17 23:58:13 +02:00 committed by GitHub
commit 7b97100ffd

View file

@ -8987,7 +8987,7 @@ class basic_json
{ {
// avoid reading too many characters // avoid reading too many characters
const size_t max_length = static_cast<size_t>(limit - start); const size_t max_length = static_cast<size_t>(limit - start);
return std::string(start + offset, std::min(length, max_length - offset)); return std::string(start + offset, (std::min)(length, max_length - offset));
} }
private: private: