diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-02-03 18:40:35 -0500 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-02-05 13:53:16 -0500 |
commit | 93e72f29f5d58dff1229c8db9db62b4f02324117 (patch) | |
tree | 975970f00278485ab112767e2758d290da588665 /src/mongo/db/pipeline/value.cpp | |
parent | 68fe6570d19c744f84861b70d541e8b46ac24935 (diff) | |
download | mongo-93e72f29f5d58dff1229c8db9db62b4f02324117.tar.gz |
SERVER-8944 Use C++11 standard library functions for double NaN and Infinity detection
Diffstat (limited to 'src/mongo/db/pipeline/value.cpp')
-rw-r--r-- | src/mongo/db/pipeline/value.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/value.cpp b/src/mongo/db/pipeline/value.cpp index b37bc1cb6d3..5c371a1f2cb 100644 --- a/src/mongo/db/pipeline/value.cpp +++ b/src/mongo/db/pipeline/value.cpp @@ -30,6 +30,7 @@ #include "mongo/db/pipeline/value.h" +#include <cmath> #include <boost/functional/hash.hpp> #include <boost/scoped_array.hpp> @@ -719,7 +720,7 @@ namespace mongo { case NumberLong: case NumberInt: { const double dbl = getDouble(); - if (isNaN(dbl)) { + if (std::isnan(dbl)) { boost::hash_combine(seed, numeric_limits<double>::quiet_NaN()); } else { |