Skip to content

Commit 8059bce

Browse files
committed
CXX-1521 Mark as noexcept
1 parent 87ce0ff commit 8059bce

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/bsoncxx/builder/basic/array.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ class array : public sub_array {
4242
///
4343
/// Move constructor
4444
///
45-
BSONCXX_INLINE array(array&& arr) : sub_array(&_core), _core(std::move(arr._core)) {}
45+
BSONCXX_INLINE array(array &&arr) noexcept : sub_array(&_core), _core(std::move(arr._core)) {}
4646

4747
///
4848
/// Move assignment operator
4949
///
50-
BSONCXX_INLINE array& operator=(array&& arr) {
50+
BSONCXX_INLINE array& operator=(array&& arr) noexcept {
5151
_core = std::move(arr._core);
5252
return *this;
5353
}

src/bsoncxx/builder/basic/document.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ class document : public sub_document {
4444
///
4545
/// Move constructor
4646
///
47-
BSONCXX_INLINE document(document&& doc) : sub_document(&_core), _core(std::move(doc._core)) {}
47+
BSONCXX_INLINE document(document &&doc) noexcept : sub_document(&_core),
48+
_core(std::move(doc._core)) {}
4849

4950
///
5051
/// Move assignment operator
5152
///
52-
BSONCXX_INLINE document& operator=(document&& doc) {
53+
BSONCXX_INLINE document& operator=(document&& doc) noexcept {
5354
_core = std::move(doc._core);
5455
return *this;
5556
}

0 commit comments

Comments
 (0)