@@ -2047,7 +2047,7 @@ class optional : private optional_internal::optional_data<T>,
20472047 optional (const optional& src) = default ;
20482048
20492049 // Move constructor, standard semantics
2050- optional (optional&& src) = default ;
2050+ optional (optional&& src) noexcept = default ;
20512051
20522052 // Constructs a non-empty `optional` direct-initialized value of type `T` from
20532053 // the arguments `std::forward<Args>(args)...` within the `optional`.
@@ -2187,7 +2187,7 @@ class optional : private optional_internal::optional_data<T>,
21872187 optional& operator =(const optional& src) = default ;
21882188
21892189 // Move assignment operator, standard semantics
2190- optional& operator =(optional&& src) = default ;
2190+ optional& operator =(optional&& src) noexcept = default ;
21912191
21922192 // Value assignment operators
21932193 template <
@@ -4765,7 +4765,7 @@ class LockableBaseImpl
47654765 DoNothing (mutex_type&, phmap::try_to_lock_t ) {}
47664766 template <class T > explicit DoNothing (T&&) {}
47674767 DoNothing& operator =(const DoNothing&) { return *this ; }
4768- DoNothing& operator =(DoNothing&&) { return *this ; }
4768+ DoNothing& operator =(DoNothing&&) noexcept { return *this ; }
47694769 void swap (DoNothing &) {}
47704770 bool owns_lock () const noexcept { return true ; }
47714771 };
@@ -4796,13 +4796,13 @@ class LockableBaseImpl
47964796 m_->try_lock ();
47974797 }
47984798
4799- WriteLock (WriteLock &&o) :
4799+ WriteLock (WriteLock &&o) noexcept :
48004800 m_ (std::move(o.m_)), locked_(std::move(o.locked_)) {
48014801 o.locked_ = false ;
48024802 o.m_ = nullptr ;
48034803 }
48044804
4805- WriteLock& operator =(WriteLock&& other) {
4805+ WriteLock& operator =(WriteLock&& other) noexcept {
48064806 WriteLock temp (std::move (other));
48074807 swap (temp);
48084808 return *this ;
@@ -4874,13 +4874,13 @@ class LockableBaseImpl
48744874 m_->try_lock_shared ();
48754875 }
48764876
4877- ReadLock (ReadLock &&o) :
4877+ ReadLock (ReadLock &&o) noexcept :
48784878 m_ (std::move(o.m_)), locked_(std::move(o.locked_)) {
48794879 o.locked_ = false ;
48804880 o.m_ = nullptr ;
48814881 }
48824882
4883- ReadLock& operator =(ReadLock&& other) {
4883+ ReadLock& operator =(ReadLock&& other) noexcept {
48844884 ReadLock temp (std::move (other));
48854885 swap (temp);
48864886 return *this ;
0 commit comments