|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78280 - trunk/boost/thread/win32
From: vicente.botet_at_[hidden]
Date: 2012-04-30 12:06:06
Author: viboes
Date: 2012-04-30 12:06:04 EDT (Mon, 30 Apr 2012)
New Revision: 78280
URL: http://svn.boost.org/trac/boost/changeset/78280
Log:
Thread: Use NO_COPYABLE macro
Text files modified:
trunk/boost/thread/win32/condition_variable.hpp | 21 +++++----------------
trunk/boost/thread/win32/mutex.hpp | 8 ++------
trunk/boost/thread/win32/once.hpp | 10 +---------
trunk/boost/thread/win32/recursive_mutex.hpp | 8 ++------
trunk/boost/thread/win32/shared_mutex.hpp | 11 ++---------
5 files changed, 12 insertions(+), 46 deletions(-)
Modified: trunk/boost/thread/win32/condition_variable.hpp
==============================================================================
--- trunk/boost/thread/win32/condition_variable.hpp (original)
+++ trunk/boost/thread/win32/condition_variable.hpp 2012-04-30 12:06:04 EDT (Mon, 30 Apr 2012)
@@ -42,10 +42,8 @@
bool notified;
long references;
- basic_cv_list_entry(basic_cv_list_entry&);
- void operator=(basic_cv_list_entry&);
-
public:
+ BOOST_THREAD_NO_COPYABLE(basic_cv_list_entry)
explicit basic_cv_list_entry(detail::win32::handle_manager const& wake_sem_):
semaphore(detail::win32::create_anonymous_semaphore(0,LONG_MAX)),
wake_sem(wake_sem_.duplicate()),
@@ -135,6 +133,7 @@
template<typename lock_type>
struct relocker
{
+ BOOST_THREAD_NO_COPYABLE(relocker)
lock_type& lock;
bool unlocked;
@@ -154,9 +153,6 @@
}
}
- private:
- relocker(relocker&);
- void operator=(relocker&);
};
@@ -188,6 +184,7 @@
{
entry_ptr const entry;
+ BOOST_THREAD_NO_COPYABLE(entry_manager)
entry_manager(entry_ptr const& entry_):
entry(entry_)
{}
@@ -201,10 +198,6 @@
{
return entry.get();
}
-
- private:
- void operator=(entry_manager&);
- entry_manager(entry_manager&);
};
@@ -301,10 +294,8 @@
class condition_variable:
private detail::basic_condition_variable
{
- private:
- condition_variable(condition_variable&);
- void operator=(condition_variable&);
public:
+ BOOST_THREAD_NO_COPYABLE(condition_variable)
condition_variable()
{}
@@ -410,10 +401,8 @@
class condition_variable_any:
private detail::basic_condition_variable
{
- private:
- condition_variable_any(condition_variable_any&);
- void operator=(condition_variable_any&);
public:
+ BOOST_THREAD_NO_COPYABLE(condition_variable_any)
condition_variable_any()
{}
Modified: trunk/boost/thread/win32/mutex.hpp
==============================================================================
--- trunk/boost/thread/win32/mutex.hpp (original)
+++ trunk/boost/thread/win32/mutex.hpp 2012-04-30 12:06:04 EDT (Mon, 30 Apr 2012)
@@ -23,10 +23,8 @@
class mutex:
public ::boost::detail::underlying_mutex
{
- private:
- mutex(mutex const&);
- mutex& operator=(mutex const&);
public:
+ BOOST_THREAD_NO_COPYABLE(mutex)
mutex()
{
initialize();
@@ -45,10 +43,8 @@
class timed_mutex:
public ::boost::detail::basic_timed_mutex
{
- private:
- timed_mutex(timed_mutex const&);
- timed_mutex& operator=(timed_mutex const&);
public:
+ BOOST_THREAD_NO_COPYABLE(timed_mutex)
timed_mutex()
{
initialize();
Modified: trunk/boost/thread/win32/once.hpp
==============================================================================
--- trunk/boost/thread/win32/once.hpp (original)
+++ trunk/boost/thread/win32/once.hpp 2012-04-30 12:06:04 EDT (Mon, 30 Apr 2012)
@@ -35,18 +35,10 @@
struct once_flag
{
+ BOOST_THREAD_NO_COPYABLE(once_flag)
BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT
: status(0), count(0)
{}
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- once_flag(const once_flag&) = delete;
- once_flag& operator=(const once_flag&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- once_flag(once_flag&);
- once_flag& operator=(once_flag&);
- public:
-#endif // BOOST_NO_DELETED_FUNCTIONS
private:
long status;
long count;
Modified: trunk/boost/thread/win32/recursive_mutex.hpp
==============================================================================
--- trunk/boost/thread/win32/recursive_mutex.hpp (original)
+++ trunk/boost/thread/win32/recursive_mutex.hpp 2012-04-30 12:06:04 EDT (Mon, 30 Apr 2012)
@@ -22,10 +22,8 @@
class recursive_mutex:
public ::boost::detail::basic_recursive_mutex
{
- private:
- recursive_mutex(recursive_mutex const&);
- recursive_mutex& operator=(recursive_mutex const&);
public:
+ BOOST_THREAD_NO_COPYABLE(recursive_mutex)
recursive_mutex()
{
::boost::detail::basic_recursive_mutex::initialize();
@@ -44,10 +42,8 @@
class recursive_timed_mutex:
public ::boost::detail::basic_recursive_timed_mutex
{
- private:
- recursive_timed_mutex(recursive_timed_mutex const&);
- recursive_timed_mutex& operator=(recursive_timed_mutex const&);
public:
+ BOOST_THREAD_NO_COPYABLE(recursive_timed_mutex)
recursive_timed_mutex()
{
::boost::detail::basic_recursive_timed_mutex::initialize();
Modified: trunk/boost/thread/win32/shared_mutex.hpp
==============================================================================
--- trunk/boost/thread/win32/shared_mutex.hpp (original)
+++ trunk/boost/thread/win32/shared_mutex.hpp 2012-04-30 12:06:04 EDT (Mon, 30 Apr 2012)
@@ -19,6 +19,7 @@
#include <boost/chrono/system_clocks.hpp>
#include <boost/chrono/ceil.hpp>
#endif
+#include <boost/thread/detail/delete.hpp>
#include <boost/config/abi_prefix.hpp>
@@ -26,15 +27,6 @@
{
class shared_mutex
{
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- shared_mutex(shared_mutex const&) = delete;
- shared_mutex& operator=(shared_mutex const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- shared_mutex(shared_mutex const&);
- shared_mutex& operator=(shared_mutex const&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
private:
struct state_data
{
@@ -87,6 +79,7 @@
public:
+ BOOST_THREAD_NO_COPYABLE(shared_mutex)
shared_mutex()
{
semaphores[unlock_sem]=detail::win32::create_anonymous_semaphore(0,LONG_MAX);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk