Don't neglect to "return *this".
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@165860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
75536baae7
commit
1dc6f7ab97
@ -728,8 +728,8 @@ public:
|
|||||||
|
|
||||||
// arithmetic
|
// arithmetic
|
||||||
|
|
||||||
_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;}
|
_LIBCPP_INLINE_VISIBILITY time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
|
||||||
|
|
||||||
// special values
|
// special values
|
||||||
|
|
||||||
|
@ -344,6 +344,7 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs)
|
|||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
swap(__rhs);
|
swap(__rhs);
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||||
|
@ -1351,6 +1351,7 @@ function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
|
|||||||
__f_ = __f.__f_;
|
__f_ = __f.__f_;
|
||||||
__f.__f_ = 0;
|
__f.__f_ = 0;
|
||||||
}
|
}
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class _Rp, class ..._ArgTypes>
|
template<class _Rp, class ..._ArgTypes>
|
||||||
@ -1362,6 +1363,7 @@ function<_Rp(_ArgTypes...)>::operator=(nullptr_t) _NOEXCEPT
|
|||||||
else if (__f_)
|
else if (__f_)
|
||||||
__f_->destroy_deallocate();
|
__f_->destroy_deallocate();
|
||||||
__f_ = 0;
|
__f_ = 0;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class _Rp, class ..._ArgTypes>
|
template<class _Rp, class ..._ArgTypes>
|
||||||
|
@ -1872,6 +1872,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::operator=(__packaged_task_function&
|
|||||||
__f_ = __f.__f_;
|
__f_ = __f.__f_;
|
||||||
__f.__f_ = nullptr;
|
__f.__f_ = nullptr;
|
||||||
}
|
}
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class _Rp, class ..._ArgTypes>
|
template<class _Rp, class ..._ArgTypes>
|
||||||
|
@ -2562,6 +2562,7 @@ public:
|
|||||||
{
|
{
|
||||||
__member_init(__f);
|
__member_init(__f);
|
||||||
__parse(__first, __last);
|
__parse(__first, __last);
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||||
|
@ -2208,6 +2208,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_InputIterator __first, _Input
|
|||||||
clear();
|
clear();
|
||||||
for (; __first != __last; ++__first)
|
for (; __first != __last; ++__first)
|
||||||
push_back(*__first);
|
push_back(*__first);
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _CharT, class _Traits, class _Allocator>
|
template <class _CharT, class _Traits, class _Allocator>
|
||||||
|
@ -2700,6 +2700,7 @@ vector<bool, _Allocator>::operator=(vector&& __v)
|
|||||||
{
|
{
|
||||||
__move_assign(__v, integral_constant<bool,
|
__move_assign(__v, integral_constant<bool,
|
||||||
__storage_traits::propagate_on_container_move_assignment::value>());
|
__storage_traits::propagate_on_container_move_assignment::value>());
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Allocator>
|
template <class _Allocator>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user