mirror of
https://github.com/boostorg/thread.git
synced 2026-02-03 09:42:16 +00:00
Compare commits
2 Commits
feature/gh
...
feature/pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09f01fbb05 | ||
|
|
27cb703930 |
@@ -18,7 +18,7 @@
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/core/swap.hpp>
|
||||
#include <boost/core/invoke_swap.hpp>
|
||||
|
||||
#include <boost/config/abi_prefix.hpp>
|
||||
|
||||
@@ -105,8 +105,8 @@ namespace boost
|
||||
|
||||
void swap(externally_locked& rhs) //BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR)
|
||||
{
|
||||
swap(obj_, rhs.obj_);
|
||||
swap(mtx_, rhs.mtx_);
|
||||
boost::core::invoke_swap(obj_, rhs.obj_);
|
||||
boost::core::invoke_swap(mtx_, rhs.mtx_);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,8 +245,8 @@ namespace boost
|
||||
|
||||
void swap(externally_locked& rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
swap(obj_, rhs.obj_);
|
||||
swap(mtx_, rhs.mtx_);
|
||||
boost::core::invoke_swap(obj_, rhs.obj_);
|
||||
boost::core::invoke_swap(mtx_, rhs.mtx_);
|
||||
}
|
||||
/**
|
||||
* Requires: The lk parameter must be locking the associated mtx.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <boost/thread/lock_algorithms.hpp>
|
||||
#include <boost/thread/lock_factories.hpp>
|
||||
#include <boost/thread/strict_lock.hpp>
|
||||
#include <boost/core/swap.hpp>
|
||||
#include <boost/core/invoke_swap.hpp>
|
||||
#include <boost/utility/declval.hpp>
|
||||
//#include <boost/type_traits.hpp>
|
||||
//#include <boost/thread/detail/is_nothrow_default_constructible.hpp>
|
||||
@@ -582,7 +582,7 @@ namespace boost
|
||||
unique_lock<mutex_type> lk1(mtx_, defer_lock);
|
||||
unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
|
||||
lock(lk1,lk2);
|
||||
boost::swap(value_, rhs.value_);
|
||||
boost::core::invoke_swap(value_, rhs.value_);
|
||||
}
|
||||
/**
|
||||
* Swap with the underlying value type
|
||||
@@ -592,7 +592,7 @@ namespace boost
|
||||
void swap(value_type & rhs)
|
||||
{
|
||||
strict_lock<mutex_type> lk(mtx_);
|
||||
boost::swap(value_, rhs);
|
||||
boost::core::invoke_swap(value_, rhs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user