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