diff --git a/include/chrono b/include/chrono index 3900d59af..508c1f377 100644 --- a/include/chrono +++ b/include/chrono @@ -728,8 +728,8 @@ public: // arithmetic - _LIBCPP_INLINE_VISIBILITY time_point& operator+=(const duration& __d) {__d_ += __d;} - _LIBCPP_INLINE_VISIBILITY time_point& operator-=(const duration& __d) {__d_ -= __d;} + _LIBCPP_INLINE_VISIBILITY time_point& operator+=(const duration& __d) {__d_ += __d; return *this;} + _LIBCPP_INLINE_VISIBILITY time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;} // special values diff --git a/include/fstream b/include/fstream index 7b6578f1e..1b8e7a0a5 100644 --- a/include/fstream +++ b/include/fstream @@ -344,6 +344,7 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs) { close(); swap(__rhs); + return *this; } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES diff --git a/include/functional b/include/functional index 8c166b73d..ec5c5e593 100644 --- a/include/functional +++ b/include/functional @@ -1351,6 +1351,7 @@ function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT __f_ = __f.__f_; __f.__f_ = 0; } + return *this; } template @@ -1362,6 +1363,7 @@ function<_Rp(_ArgTypes...)>::operator=(nullptr_t) _NOEXCEPT else if (__f_) __f_->destroy_deallocate(); __f_ = 0; + return *this; } template diff --git a/include/future b/include/future index 758296a12..39475bd95 100644 --- a/include/future +++ b/include/future @@ -1872,6 +1872,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::operator=(__packaged_task_function& __f_ = __f.__f_; __f.__f_ = nullptr; } + return *this; } template diff --git a/include/regex b/include/regex index 3918ee0d6..7505f2ea3 100644 --- a/include/regex +++ b/include/regex @@ -2562,6 +2562,7 @@ public: { __member_init(__f); __parse(__first, __last); + return *this; } #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS diff --git a/include/string b/include/string index 7c022dcaf..89a00e55b 100644 --- a/include/string +++ b/include/string @@ -2208,6 +2208,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_InputIterator __first, _Input clear(); for (; __first != __last; ++__first) push_back(*__first); + return *this; } template diff --git a/include/vector b/include/vector index 07859c94e..ee7143555 100644 --- a/include/vector +++ b/include/vector @@ -2700,6 +2700,7 @@ vector::operator=(vector&& __v) { __move_assign(__v, integral_constant()); + return *this; } template