summaryrefslogtreecommitdiff
path: root/src/mongo/bson/util/builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/bson/util/builder.h')
-rw-r--r--src/mongo/bson/util/builder.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/bson/util/builder.h b/src/mongo/bson/util/builder.h
index e40238ca28f..fbb470fd6fd 100644
--- a/src/mongo/bson/util/builder.h
+++ b/src/mongo/bson/util/builder.h
@@ -478,11 +478,10 @@ private:
StringBuilderImpl& appendIntegral(T val, int maxSize) {
MONGO_STATIC_ASSERT(!std::is_same<T, char>()); // char shouldn't append as number.
MONGO_STATIC_ASSERT(std::is_integral<T>());
- MONGO_STATIC_ASSERT(std::numeric_limits<T>::max() <= std::numeric_limits<uint64_t>::max());
if (val < 0) {
*this << '-';
- append(StringData(ItoA(-uint64_t(val)))); // Send the magnitude to ItoA.
+ append(StringData(ItoA(0 - uint64_t(val)))); // Send the magnitude to ItoA.
} else {
append(StringData(ItoA(uint64_t(val))));
}