summaryrefslogtreecommitdiff
path: root/src/mongo/bson/mutable
diff options
context:
space:
mode:
authorMatt Cotter <matt.cotter@mongodb.com>2016-09-08 17:24:07 -0400
committerMatt Cotter <matt.cotter@mongodb.com>2016-09-09 13:22:25 -0400
commit2bd286acef2fdb035f1d45253f6e6e4c24a2dc04 (patch)
tree13943305b07a3e368ca48d5b1520cfee02ce0b3f /src/mongo/bson/mutable
parentae280145c3c3dc770884a68885e80a282e8d50fd (diff)
downloadmongo-2bd286acef2fdb035f1d45253f6e6e4c24a2dc04.tar.gz
SERVER-22973 use mongo macros for static assert
Diffstat (limited to 'src/mongo/bson/mutable')
-rw-r--r--src/mongo/bson/mutable/document.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/bson/mutable/document.cpp b/src/mongo/bson/mutable/document.cpp
index ddf1f83281d..93ca13cc751 100644
--- a/src/mongo/bson/mutable/document.cpp
+++ b/src/mongo/bson/mutable/document.cpp
@@ -32,8 +32,10 @@
#include <cstdlib>
#include <cstring>
#include <limits>
+#include <type_traits>
#include <vector>
+#include "mongo/base/static_assert.h"
#include "mongo/bson/inline_decls.h"
#include "mongo/bson/mutable/damage_vector.h"
#include "mongo/util/debug_util.h"
@@ -466,12 +468,12 @@ struct ElementRep {
};
#pragma pack(pop)
-static_assert(sizeof(ElementRep) == 32, "sizeof(ElementRep) == 32");
+MONGO_STATIC_ASSERT(sizeof(ElementRep) == 32);
// We want ElementRep to be a POD so Document::Impl can grow the std::vector with
// memmove.
//
-// TODO: C++11 static_assert(std::is_pod<ElementRep>::value);
+MONGO_STATIC_ASSERT(std::is_pod<ElementRep>::value);
// The ElementRep for the root element is always zero.
const Element::RepIdx kRootRepIdx = Element::RepIdx(0);