summaryrefslogtreecommitdiff
path: root/boost/coroutine2/detail/push_coroutine.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/coroutine2/detail/push_coroutine.ipp')
-rw-r--r--boost/coroutine2/detail/push_coroutine.ipp12
1 files changed, 6 insertions, 6 deletions
diff --git a/boost/coroutine2/detail/push_coroutine.ipp b/boost/coroutine2/detail/push_coroutine.ipp
index dd51403d9b..dedfa42429 100644
--- a/boost/coroutine2/detail/push_coroutine.ipp
+++ b/boost/coroutine2/detail/push_coroutine.ipp
@@ -56,8 +56,8 @@ push_coroutine< T >::~push_coroutine() {
template< typename T >
push_coroutine< T >::push_coroutine( push_coroutine && other) noexcept :
- cb_{ other.cb_ } {
- other.cb_ = nullptr;
+ cb_{ nullptr } {
+ std::swap( cb_, other.cb_);
}
template< typename T >
@@ -116,8 +116,8 @@ push_coroutine< T & >::~push_coroutine() {
template< typename T >
push_coroutine< T & >::push_coroutine( push_coroutine && other) noexcept :
- cb_{ other.cb_ } {
- other.cb_ = nullptr;
+ cb_{ nullptr } {
+ std::swap( cb_, other.cb_);
}
template< typename T >
@@ -167,8 +167,8 @@ push_coroutine< void >::~push_coroutine() {
inline
push_coroutine< void >::push_coroutine( push_coroutine && other) noexcept :
- cb_{ other.cb_ } {
- other.cb_ = nullptr;
+ cb_{ nullptr } {
+ std::swap( cb_, other.cb_);
}
inline