diff options
author | Alya Berciu <alya.berciu@mongodb.com> | 2019-05-31 17:47:22 -0400 |
---|---|---|
committer | Alya Berciu <alya.berciu@mongodb.com> | 2019-06-03 13:25:57 -0400 |
commit | 9d212e4f098ccf4821fd6a1acde60402373b70ee (patch) | |
tree | 5de5a5a12748a7d51aa5a958dba8b9c6eaedf110 /src/mongo/bson | |
parent | 928aabbaf9444005fa4fafb399244ce6d475eb9f (diff) | |
download | mongo-9d212e4f098ccf4821fd6a1acde60402373b70ee.tar.gz |
SERVER-17311 Ensure BSONObj, RecordData, and SharedBuffer are noexcept moveable
Diffstat (limited to 'src/mongo/bson')
-rw-r--r-- | src/mongo/bson/bsonobj.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/bson/bsonobj.h b/src/mongo/bson/bsonobj.h index 69e85b2117d..2faa7c9cc09 100644 --- a/src/mongo/bson/bsonobj.h +++ b/src/mongo/bson/bsonobj.h @@ -33,6 +33,7 @@ #include <list> #include <set> #include <string> +#include <type_traits> #include <utility> #include <vector> @@ -591,6 +592,9 @@ private: ConstSharedBuffer _ownedBuffer; }; +MONGO_STATIC_ASSERT(std::is_nothrow_move_constructible_v<BSONObj>); +MONGO_STATIC_ASSERT(std::is_nothrow_move_assignable_v<BSONObj>); + std::ostream& operator<<(std::ostream& s, const BSONObj& o); std::ostream& operator<<(std::ostream& s, const BSONElement& e); |