Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51276 - in sandbox/synchro/boost/synchro: . detail poly process queues thread
From: vicente.botet_at_[hidden]
Date: 2009-02-16 16:18:40


Author: viboes
Date: 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
New Revision: 51276
URL: http://svn.boost.org/trac/boost/changeset/51276

Log:
Boost.Synchro V0.0.0
Replacing noncopyable by DELETE macros

Text files modified:
   sandbox/synchro/boost/synchro/condition_safe.hpp | 8 ++++++
   sandbox/synchro/boost/synchro/detail/defaulted_functions.hpp | 7 +++--
   sandbox/synchro/boost/synchro/detail/deleted_functions.hpp | 20 +++++++++++++++-
   sandbox/synchro/boost/synchro/lockable_adapter.hpp | 5 +--
   sandbox/synchro/boost/synchro/null_condition.hpp | 11 ++++-----
   sandbox/synchro/boost/synchro/null_mutex.hpp | 8 +++---
   sandbox/synchro/boost/synchro/poly/lock_adapter.hpp | 4 +++
   sandbox/synchro/boost/synchro/process/lockable_scope_traits.hpp | 16 -------------
   sandbox/synchro/boost/synchro/process/locks.hpp | 18 ++++++++++-----
   sandbox/synchro/boost/synchro/process/mutex.hpp | 11 ++++-----
   sandbox/synchro/boost/synchro/process/named_mutex.hpp | 13 +++++------
   sandbox/synchro/boost/synchro/process/named_recursive_mutex.hpp | 13 +++++------
   sandbox/synchro/boost/synchro/process/named_upgradable_mutex.hpp | 10 +++++---
   sandbox/synchro/boost/synchro/process/recursive_mutex.hpp | 10 +++-----
   sandbox/synchro/boost/synchro/process/upgradable_mutex.hpp | 11 ++++-----
   sandbox/synchro/boost/synchro/queues/synchro_buffer_family.hpp | 6 ++--
   sandbox/synchro/boost/synchro/queues/synchro_buffer_monitor.hpp | 3 ++
   sandbox/synchro/boost/synchro/semaphore.hpp | 8 ++----
   sandbox/synchro/boost/synchro/thread/lockable_scope_traits.hpp | 16 -------------
   sandbox/synchro/boost/synchro/thread/locks.hpp | 14 +++++++----
   sandbox/synchro/boost/synchro/thread/mutex.hpp | 46 ++++++++++++++++++++--------------------
   sandbox/synchro/boost/synchro/thread/recursive_mutex.hpp | 22 ++++++++----------
   sandbox/synchro/boost/synchro/thread/shared_mutex.hpp | 9 +++----
   23 files changed, 144 insertions(+), 145 deletions(-)

Modified: sandbox/synchro/boost/synchro/condition_safe.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/condition_safe.hpp (original)
+++ sandbox/synchro/boost/synchro/condition_safe.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -14,6 +14,8 @@
 #include <boost/synchro/lockable_concepts.hpp>
 #include <boost/thread/condition.hpp>
 #include <boost/synchro/thread/mutex.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
+#include <boost/synchro/detail/defaulted_functions.hpp>
 
 namespace boost { namespace synchro {
 
@@ -29,10 +31,16 @@
 public:
     typedef Condition condition;
     typedef condition_backdoor<Condition> backdoor;
+
+ BOOST_DEFAULT_CONSTRUCTOR_DEFAULT(condition_safe) /*< reestablish default construction >*/
+ BOOST_COPY_CONSTRUCTOR_DELETE(condition_safe) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(condition_safe) /*< disable copy asignement >*/
+
     void notify_one() { cond_.notify_one(); }
     void notify_all() { cond_.notify_all(); }
 private:
     friend class condition_backdoor<Condition>;
+
     template <typename Locker, typename Predicate>
     void wait_when(Locker& lock, Predicate pred) {
         cond_.wait(lock, pred);

Modified: sandbox/synchro/boost/synchro/detail/defaulted_functions.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/detail/defaulted_functions.hpp (original)
+++ sandbox/synchro/boost/synchro/detail/defaulted_functions.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -20,7 +20,7 @@
     #define BOOST_DEFAULT_CONSTRUCTOR_DEFAULT(T) \
       T()=default; \
 
- #define BOOST_COPY_ASSIGNEMENT_DELETE(T) \
+ #define BOOST_COPY_ASSIGNEMENT_DEFAULT(T) \
       T& operator=(const T& rhs)=default; \
 
 #else // !defined(BOOST_HAS_DEFAULTED_FUNCTIONS)
@@ -28,11 +28,12 @@
     #define BOOST_DEFAULT_CONSTRUCTOR_DEFAULT(T) \
       inline T(){}; \
 
- #define BOOST_COPY_ASSIGNEMENT_DELETE(T) \
+ #define BOOST_COPY_ASSIGNEMENT_DEFAULT(T) \
       inline T& operator=(const T& rhs) { \
         T tmp(rhs); \
         swap(tmp);\
         return this;\
       }
 
-#endif // !defined(BOOST_HAS_DEFAULTED_FUNCTIONS)
\ No newline at end of file
+#endif // !defined(BOOST_HAS_DEFAULTED_FUNCTIONS)
+#endif

Modified: sandbox/synchro/boost/synchro/detail/deleted_functions.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/detail/deleted_functions.hpp (original)
+++ sandbox/synchro/boost/synchro/detail/deleted_functions.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -26,8 +26,14 @@
 #define BOOST_COPY_CONSTRUCTOR_DELETE(T) \
   T(const T&)=delete;
 
+#define BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE(T) \
+ T(T&)=delete;
+
 #define BOOST_COPY_ASSIGNEMENT_DELETE(T) \
- const T& operator=(const T&)=delete;
+ T& operator=(const T&)=delete;
+
+#define BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE(T) \
+ const T& operator=(T&)=delete;
 
 #define BOOST_SEQUENCE_DELETE(T) \
   T operator,(T)=delete;
@@ -79,9 +85,19 @@
   T(const T&); \
 public:
 
+#define BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE(T) \
+private: \
+ T(T&); \
+public:
+
 #define BOOST_COPY_ASSIGNEMENT_DELETE(T) \
 private: \
- const T& operator=(const T&); \
+ T& operator=(const T&); \
+public:
+
+#define BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE(T) \
+private: \
+ T& operator=(T&); \
 public:
 
 #define BOOST_SEQUENCE_DELETE(T) \

Modified: sandbox/synchro/boost/synchro/lockable_adapter.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/lockable_adapter.hpp (original)
+++ sandbox/synchro/boost/synchro/lockable_adapter.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -31,14 +31,13 @@
     typedef typename lifetime_tag<Lockable>::type lifetime;
     typedef typename naming_tag<Lockable>::type naming;
 
+ BOOST_COPY_CONSTRUCTOR_DELETE(exclusive_lockable_adapter) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(exclusive_lockable_adapter) /*< disable copy asignement >*/
     exclusive_lockable_adapter() {}
     void lock() {lock_.lock();}
     void unlock() {lock_.unlock();}
     bool try_lock() { return lock_.try_lock();}
 
- BOOST_COPY_CONSTRUCTOR_DELETE(exclusive_lockable_adapter) /*< disable copy construction >*/
- BOOST_COPY_ASSIGNEMENT_DELETE(exclusive_lockable_adapter) /*< disable copy asignement >*/
-
 protected:
     lockable_type* mutex() const { return &lock_; }
     mutable Lockable lock_;

Modified: sandbox/synchro/boost/synchro/null_condition.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/null_condition.hpp (original)
+++ sandbox/synchro/boost/synchro/null_condition.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 //!Describes null_mutex class
 #include <boost/synchro/null_mutex.hpp>
 #include <boost/thread/thread_time.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost {
 
@@ -23,13 +24,11 @@
 
 class null_condition
 {
-private:
- /// @cond
+public:
    //Non-copyable
- null_condition(const null_condition &);
- null_condition &operator=(const null_condition &);
- /// @endcond
- public:
+ BOOST_COPY_CONSTRUCTOR_DELETE(null_condition) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(null_condition) /*< disable copy asignement >*/
+
    //!Constructs a null_condition. On error throws interprocess_exception.
    null_condition(){}
 

Modified: sandbox/synchro/boost/synchro/null_mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/null_mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/null_mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -14,6 +14,7 @@
 
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/thread/thread_time.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 //!\file
 //!Describes null_mutex classes
@@ -35,14 +36,13 @@
     has_timed_interface_tag, void
>
 {
- /// @cond
- null_mutex(const null_mutex&);
- null_mutex &operator= (const null_mutex&);
- /// @endcond
 public:
     typedef null_condition best_condition_type;
     typedef null_condition best_condition_any_type;
 
+ BOOST_COPY_CONSTRUCTOR_DELETE(null_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(null_mutex) /*< disable copy asignement >*/
+
    //!Constructor.
    //!Empty.
    null_mutex(){}

Modified: sandbox/synchro/boost/synchro/poly/lock_adapter.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/poly/lock_adapter.hpp (original)
+++ sandbox/synchro/boost/synchro/poly/lock_adapter.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -12,6 +12,8 @@
 #define BOOST_SYNCHRO_POLY_LOCK_ADAPTER__HPP
 
 #include <boost/synchro/poly/lock.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
+
 namespace boost { namespace synchro { namespace poly {
 
 //////////////////////////////////////////////////////////////////////////////
@@ -28,6 +30,8 @@
     typedef typename lifetime_tag<Lockable>::type lifetime;
     typedef typename naming_tag<Lockable>::type naming;
 
+ BOOST_COPY_CONSTRUCTOR_DELETE(exclusive_lock_adapter) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(exclusive_lock_adapter) /*< disable copy asignement >*/
     exclusive_lock_adapter(): lock_() {}
     ~exclusive_lock_adapter() {}
 

Modified: sandbox/synchro/boost/synchro/process/lockable_scope_traits.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/process/lockable_scope_traits.hpp (original)
+++ sandbox/synchro/boost/synchro/process/lockable_scope_traits.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -51,22 +51,6 @@
     typedef boost::interprocess::upgradable_lock<lockable_type> upgrade_lock;
 
 };
-//template<typename Lockable>
-//lockable_scope_traits<multi_process_tag, Lockable>::defer_lock_t
-////boost::interprocess::detail::defer_lock_type
-//lockable_scope_traits<multi_process_tag, Lockable>::defer_lock ={};
-////(lockable_scope_traits<multi_process_tag, Lockable>::defer_lock_type());
-//
-//template<typename Lockable>
-//const lockable_scope_traits<multi_process_tag, Lockable>::adopt_lock_t
-//lockable_scope_traits<multi_process_tag, Lockable>::adopt_lock
-//={};
-//
-//template<typename Lockable>
-//const lockable_scope_traits<multi_process_tag, Lockable>::try_to_lock_t
-//lockable_scope_traits<multi_process_tag, Lockable>::try_to_lock
-//={};
-
 
 }
 }

Modified: sandbox/synchro/boost/synchro/process/locks.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/process/locks.hpp (original)
+++ sandbox/synchro/boost/synchro/process/locks.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 #include <boost/interprocess/sync/sharable_lock.hpp>
 #include <boost/interprocess/sync/upgradable_lock.hpp>
 #include <boost/synchro/lockable_traits.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 
@@ -40,10 +41,15 @@
         typedef multi_process_tag scope_tag_type;
         typedef typename unique_lock_type<Mutex>::type base_type;
         unique_locker(unique_locker&);
- explicit unique_locker(unique_locker<Mutex, scope_tag_type>&);
- unique_locker& operator=(unique_locker&);
- unique_locker& operator=(unique_locker<Mutex, scope_tag_type>& other);
+
+ //explicit unique_locker(unique_locker<Mutex, scope_tag_type>&);
+ //unique_locker& operator=(unique_locker&);
+ //unique_locker& operator=(unique_locker<Mutex, scope_tag_type>&);
     public:
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(unique_locker) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(unique_locker) /*< disable copy asignement >*/
+
         unique_locker(): base_type()
         {}
 
@@ -101,7 +107,7 @@
             return *this;
         }
 
- unique_locker& operator=(upgrade_locker<Mutex>&& other)
+ unique_locker& operator=(upgrade_locker<Mutex, multi_process_tag>&& other)
         {
             unique_locker temp(other);
             swap(temp);
@@ -280,7 +286,7 @@
             return *this;
         }
 
- try_unique_locker& operator=(upgrade_locker<Mutex>&& other)
+ try_unique_locker& operator=(upgrade_locker<Mutex, multi_process_tag>&& other)
         {
             try_unique_locker temp(other);
             swap(temp);
@@ -635,7 +641,7 @@
         explicit upgrade_to_unique_locker(upgrade_to_unique_locker&);
         upgrade_to_unique_locker& operator=(upgrade_to_unique_locker&);
     public:
- explicit upgrade_to_unique_locker(upgrade_locker<Mutex>& m_): base_type(m_)
+ explicit upgrade_to_unique_locker(upgrade_locker<Mutex, multi_process_tag>& m_): base_type(m_)
         {}
         ~upgrade_to_unique_locker()
         {}

Modified: sandbox/synchro/boost/synchro/process/mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/process/mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/process/mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -16,6 +16,7 @@
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/process/lockable_scope_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 
@@ -30,16 +31,14 @@
     boost::interprocess::interprocess_mutex
>
 {
-
- //Non-copyable
- interprocess_mutex(const interprocess_mutex &);
- interprocess_mutex &operator=(const interprocess_mutex &);
-
 public:
-
     typedef boost::interprocess::interprocess_condition best_condition_type;
     typedef boost::interprocess::interprocess_condition best_condition_any_type;
 
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(interprocess_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(interprocess_mutex) /*< disable copy asignement >*/
+
     bool try_lock_until(system_time const & abs_time)
     {return timed_lock(abs_time);}
     template<typename TimeDuration>

Modified: sandbox/synchro/boost/synchro/process/named_mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/process/named_mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/process/named_mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/process/lockable_scope_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 class named_mutex
@@ -28,17 +29,15 @@
     named_tag
>
 {
-
- //Non-copyable
- named_mutex(const named_mutex &);
- named_mutex &operator=(const named_mutex &);
- named_mutex();
-
 public:
-
     typedef boost::interprocess::interprocess_condition best_condition_type;
     typedef boost::interprocess::interprocess_condition best_condition_any_type;
 
+ BOOST_DEFAULT_CONSTRUCTOR_DELETE(named_mutex) /*< disable default construction >*/
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(named_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(named_mutex) /*< disable copy asignement >*/
+
     named_mutex(interprocess::create_only_t create_only, const char *name)
        : interprocess::named_mutex(create_only, name) {};
        named_mutex(interprocess::open_or_create_t open_or_create, const char *name)

Modified: sandbox/synchro/boost/synchro/process/named_recursive_mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/process/named_recursive_mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/process/named_recursive_mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/process/lockable_scope_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 class named_recursive_mutex
@@ -28,17 +29,15 @@
     named_tag
>
 {
-
- //Non-copyable
- named_recursive_mutex(const named_recursive_mutex &);
- named_recursive_mutex &operator=(const named_recursive_mutex &);
- named_recursive_mutex();
-
 public:
-
     typedef boost::interprocess::interprocess_condition best_condition_type;
     typedef boost::interprocess::interprocess_condition best_condition_any_type;
 
+ BOOST_DEFAULT_CONSTRUCTOR_DELETE(named_recursive_mutex) /*< disable default construction >*/
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(named_recursive_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(named_recursive_mutex) /*< disable copy asignement >*/
+
     named_recursive_mutex(interprocess::create_only_t create_only, const char *name)
            : interprocess::named_recursive_mutex(create_only, name) {};
        named_recursive_mutex(interprocess::open_or_create_t open_or_create, const char *name)

Modified: sandbox/synchro/boost/synchro/process/named_upgradable_mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/process/named_upgradable_mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/process/named_upgradable_mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/process/lockable_scope_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 
@@ -29,14 +30,15 @@
         named_tag
>
 {
- //Non-copyable
- interprocess_named_upgradable_mutex(const interprocess_upgradable_mutex &);
- interprocess_named_upgradable_mutex &operator=(const interprocess_named_upgradable_mutex &);
- interprocess_named_upgradable_mutex();
 public:
     typedef boost::interprocess::interprocess_condition condition_type;
     typedef boost::interprocess::interprocess_condition condition_any_type;
 
+ BOOST_DEFAULT_CONSTRUCTOR_DELETE(interprocess_named_upgradable_mutex) /*< disable default construction >*/
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(interprocess_named_upgradable_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(interprocess_named_upgradable_mutex) /*< disable copy asignement >*/
+
     interprocess_named_upgradable_mutex(interprocess::create_only_t create_only, const char *name)
            : interprocess::named_upgradable_mutex(create_only, name) {};
        interprocess_named_upgradable_mutex(interprocess::open_or_create_t open_or_create, const char *name)

Modified: sandbox/synchro/boost/synchro/process/recursive_mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/process/recursive_mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/process/recursive_mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/process/lockable_scope_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 
@@ -29,16 +30,13 @@
     boost::interprocess::interprocess_recursive_mutex
>
 {
-
- //Non-copyable
- interprocess_recursive_mutex(const interprocess_recursive_mutex &);
- interprocess_recursive_mutex &operator=(const interprocess_recursive_mutex &);
-
 public:
-
     typedef boost::interprocess::interprocess_condition best_condition_type;
     typedef boost::interprocess::interprocess_condition best_condition_any_type;
 
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(interprocess_recursive_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(interprocess_recursive_mutex) /*< disable copy asignement >*/
     interprocess_recursive_mutex(){}
         
     bool try_lock_until(system_time const & abs_time)

Modified: sandbox/synchro/boost/synchro/process/upgradable_mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/process/upgradable_mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/process/upgradable_mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/process/lockable_scope_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 
@@ -29,16 +30,14 @@
     interprocess::interprocess_upgradable_mutex
>
 {
-
- //Non-copyable
- interprocess_upgradable_mutex(const interprocess_upgradable_mutex &);
- interprocess_upgradable_mutex &operator=(const interprocess_upgradable_mutex &);
-
 public:
-
     typedef boost::interprocess::interprocess_condition condition_type;
     typedef boost::interprocess::interprocess_condition condition_any_type;
 
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(interprocess_upgradable_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(interprocess_upgradable_mutex) /*< disable copy asignement >*/
+
     bool try_lock_until(system_time const & abs_time)
     {return timed_lock(abs_time);}
     template<typename TimeDuration>

Modified: sandbox/synchro/boost/synchro/queues/synchro_buffer_family.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/queues/synchro_buffer_family.hpp (original)
+++ sandbox/synchro/boost/synchro/queues/synchro_buffer_family.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -11,11 +11,9 @@
 #ifndef BOOST_SYNCHRO_QUEUES_SYNCHRO_BUFFER__HPP
 #define BOOST_SYNCHRO_QUEUES_SYNCHRO_BUFFER__HPP
 
-//#include <boost/thread/locks.hpp>
-//#include <boost/thread/mutex.hpp>
-//#include <boost/thread/condition_variable.hpp>
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/lockers.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 #if 0
@@ -81,6 +79,8 @@
     unsigned in_, out_;
 
 public:
+ BOOST_COPY_CONSTRUCTOR_DELETE(sync_buffer) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(sync_buffer) /*< disable copy asignement >*/
     sync_buffer():in_(0), out_(0) {}
 
     bool full() { return out_==(in_+1)%(size+1); }

Modified: sandbox/synchro/boost/synchro/queues/synchro_buffer_monitor.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/queues/synchro_buffer_monitor.hpp (original)
+++ sandbox/synchro/boost/synchro/queues/synchro_buffer_monitor.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -12,6 +12,7 @@
 #define BOOST_SYNCHRO_CONC_BUFFER__HPP
 
 #include <boost/synchro/monitor.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 
@@ -58,6 +59,8 @@
         sync_buffer &that_;
     };
 public:
+ BOOST_COPY_CONSTRUCTOR_DELETE(sync_buffer) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(sync_buffer) /*< disable copy asignement >*/
     sync_buffer():in_(0), out_(0) {}
 
     bool full() { return out_==(in_+1)%(size+1); }

Modified: sandbox/synchro/boost/synchro/semaphore.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/semaphore.hpp (original)
+++ sandbox/synchro/boost/synchro/semaphore.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 
 #include <boost/synchro/thread_synchronization_family.hpp>
 #include <boost/synchro/lockable_traits.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 //!\file
 //!Describes a semaphore class for inter-process synchronization
@@ -33,12 +34,9 @@
     typedef typename unique_lock_type<lockable_type>::type scoped_lock;
     typedef basic_semaphore this_type;
 
- /// @cond
- //Non-copyable
- basic_semaphore(const this_type &);
- this_type& operator=(const this_type &);
- /// @endcond
 public:
+ BOOST_COPY_CONSTRUCTOR_DELETE(basic_semaphore) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(basic_semaphore) /*< disable copy asignement >*/
 
     //!Creates a semaphore with the given initial count.
     //!exception if there is an error.*/

Modified: sandbox/synchro/boost/synchro/thread/lockable_scope_traits.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/thread/lockable_scope_traits.hpp (original)
+++ sandbox/synchro/boost/synchro/thread/lockable_scope_traits.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -33,24 +33,8 @@
     static const defer_lock_t& defer_lock() {return boost::defer_lock;}
     static const adopt_lock_t& adopt_lock() {return boost::adopt_lock;}
     static const try_to_lock_t& try_to_lock() {return boost::try_to_lock;}
-
-#if 0
- static const defer_lock_t defer_lock;
- static const adopt_lock_t adopt_lock;
- static const try_to_lock_t try_to_lock;
-#endif
-
 };
 
-#if 0
-template<>
-const boost::defer_lock_t lockable_scope_traits<multi_threaded_tag>::defer_lock={};
-template<typename Lockable>
-const boost::adopt_lock_t lockable_scope_traits<multi_threaded_tag>::adopt_lock={};
-template<typename Lockable>
-const boost::try_to_lock_t lockable_scope_traits<multi_threaded_tag>::try_to_lock={};
-#endif
-
 template<typename Lockable>
 struct lockable_scope_traits<multi_threaded_tag, Lockable> : scope_traits<multi_threaded_tag>
 {

Modified: sandbox/synchro/boost/synchro/thread/locks.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/thread/locks.hpp (original)
+++ sandbox/synchro/boost/synchro/thread/locks.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -15,6 +15,7 @@
 #include <boost/thread/locks.hpp>
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/lockers.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 
 namespace boost { namespace synchro {
@@ -46,10 +47,13 @@
         typedef multi_threaded_tag scope_tag_type;
         typedef typename unique_lock_type<Mutex>::type base_type;
         //unique_locker(unique_locker&);
- explicit unique_locker(unique_locker<Mutex, scope_tag_type>&);
+ //explicit unique_locker(unique_locker<Mutex, scope_tag_type>&);
         //unique_locker& operator=(unique_locker&);
- unique_locker& operator=(unique_locker<Mutex, scope_tag_type>& other);
+ //unique_locker& operator=(unique_locker<Mutex, scope_tag_type>& other);
+
     public:
+ BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE(unique_locker) /*< disable copy construction >*/
+ BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE(unique_locker) /*< disable copy asignement >*/
         unique_locker(): base_type()
         {}
 
@@ -107,7 +111,7 @@
             return *this;
         }
 
- unique_locker& operator=(upgrade_locker<Mutex>&& other)
+ unique_locker& operator=(upgrade_locker<Mutex, multi_threaded_tag>&& other)
         {
             unique_locker temp(other);
             swap(temp);
@@ -265,7 +269,7 @@
             return *this;
         }
 
- try_unique_locker& operator=(upgrade_locker<Mutex>&& other)
+ try_unique_locker& operator=(upgrade_locker<Mutex, multi_threaded_tag>&& other)
         {
             try_unique_locker temp(other);
             swap(temp);
@@ -573,7 +577,7 @@
         explicit upgrade_to_unique_locker(upgrade_to_unique_locker&);
         upgrade_to_unique_locker& operator=(upgrade_to_unique_locker&);
     public:
- explicit upgrade_to_unique_locker(upgrade_locker<Mutex>& m_): base_type(m_)
+ explicit upgrade_to_unique_locker(upgrade_locker<Mutex, multi_threaded_tag>& m_): base_type(m_)
         {}
         ~upgrade_to_unique_locker()
         {}

Modified: sandbox/synchro/boost/synchro/thread/mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/thread/mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/thread/mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -18,6 +18,7 @@
 #include <boost/thread/thread_time.hpp>
 #include <boost/synchro/thread/lockable_scope_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 
 namespace boost { namespace synchro {
@@ -33,15 +34,15 @@
     mutex
>
 {
-
- //Non-copyable
- thread_mutex(const thread_mutex &);
- thread_mutex &operator=(const thread_mutex &);
-
 public:
+ // public types
     typedef boost::condition_variable best_condition_type;
     typedef boost::condition_variable_any best_condition_any_type;
 
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(thread_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(thread_mutex) /*< disable copy asignement >*/
+
     thread_mutex() {}
 };
 
@@ -123,32 +124,31 @@
     process_lifetime_tag,
     anonymous_tag,
     timed_mutex
->
-{
-
- //Non-copyable
- thread_timed_mutex(const thread_mutex &);
- thread_timed_mutex &operator=(const thread_mutex &);
-
+> {
 public:
-
     typedef boost::condition_variable_any best_condition_type;
     typedef boost::condition_variable_any best_condition_any_type;
 
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(thread_timed_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(thread_timed_mutex) /*< disable copy asignement >*/
     thread_timed_mutex () {}
         
- bool try_lock_until(system_time const & abs_time)
- {return timed_lock(abs_time);}
+ bool try_lock_until(system_time const & abs_time) {
+ return timed_lock(abs_time);
+ }
     template<typename TimeDuration>
- bool try_lock_for(TimeDuration const & relative_time)
- {return timed_lock(relative_time);}
-
- void lock_until(system_time const & abs_time)
- {if(!timed_lock(abs_time)) throw timeout_exception();}
+ bool try_lock_for(TimeDuration const & relative_time) {
+ return timed_lock(relative_time);
+ }
+
+ void lock_until(system_time const & abs_time) {
+ if(!timed_lock(abs_time)) throw timeout_exception();
+ }
     template<typename TimeDuration>
- void lock_for(TimeDuration const & relative_time)
- {if(!timed_lock(relative_time)) throw timeout_exception();}
-
+ void lock_for(TimeDuration const & relative_time) {
+ if(!timed_lock(relative_time)) throw timeout_exception();
+ }
 };
 
 #if 0

Modified: sandbox/synchro/boost/synchro/thread/recursive_mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/thread/recursive_mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/thread/recursive_mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -16,6 +16,7 @@
 #include <boost/synchro/thread/lockable_scope_traits.hpp>
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
 
@@ -31,15 +32,13 @@
     recursive_mutex
>
 {
-
- //Non-copyable
- thread_recursive_mutex(const thread_recursive_mutex &);
- thread_recursive_mutex &operator=(const thread_recursive_mutex &);
-
 public:
-
     typedef boost::condition_variable_any best_condition_type;
     typedef boost::condition_variable_any best_condition_any_type;
+
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(thread_recursive_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(thread_recursive_mutex) /*< disable copy asignement >*/
     thread_recursive_mutex() {}
 };
 #if 0
@@ -98,16 +97,15 @@
>
 {
 
- //Non-copyable
- thread_recursive_timed_mutex(const thread_recursive_timed_mutex &);
- thread_recursive_timed_mutex &operator=(const thread_recursive_timed_mutex &);
-
 public:
- thread_recursive_timed_mutex() {}
-
     typedef boost::condition_variable_any best_condition_type;
     typedef boost::condition_variable_any best_condition_any_type;
 
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(thread_recursive_timed_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(thread_recursive_timed_mutex) /*< disable copy asignement >*/
+ thread_recursive_timed_mutex() {}
+
     bool try_lock_until(system_time const & abs_time)
     {return this->timed_lock(abs_time);}
     template<typename TimeDuration>

Modified: sandbox/synchro/boost/synchro/thread/shared_mutex.hpp
==============================================================================
--- sandbox/synchro/boost/synchro/thread/shared_mutex.hpp (original)
+++ sandbox/synchro/boost/synchro/thread/shared_mutex.hpp 2009-02-16 16:18:38 EST (Mon, 16 Feb 2009)
@@ -16,6 +16,7 @@
 #include <boost/synchro/lockable_traits.hpp>
 #include <boost/synchro/thread/lockable_scope_traits.hpp>
 #include <boost/synchro/timeout_exception.hpp>
+#include <boost/synchro/detail/deleted_functions.hpp>
 
 namespace boost { namespace synchro {
     
@@ -30,15 +31,13 @@
     shared_mutex
>
 {
-
- //Non-copyable
- thread_shared_mutex(const thread_shared_mutex &);
- thread_shared_mutex &operator=(const thread_shared_mutex &);
-
 public:
     typedef boost::condition_variable_any best_condition_type;
     typedef boost::condition_variable_any best_condition_any_type;
 
+ //Non-copyable
+ BOOST_COPY_CONSTRUCTOR_DELETE(thread_shared_mutex) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(thread_shared_mutex) /*< disable copy asignement >*/
     thread_shared_mutex() {}
 
     bool try_lock_until(system_time const & abs_time)


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