Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86495 - trunk/boost/lockfree
From: tim_at_[hidden]
Date: 2013-10-28 06:05:52


Author: timblechmann
Date: 2013-10-28 06:05:52 EDT (Mon, 28 Oct 2013)
New Revision: 86495
URL: http://svn.boost.org/trac/boost/changeset/86495

Log:
lockfree: use BOOST_DELETED_FUNCTION

Text files modified:
   trunk/boost/lockfree/queue.hpp | 13 ++-----------
   trunk/boost/lockfree/spsc_queue.hpp | 13 ++-----------
   trunk/boost/lockfree/stack.hpp | 13 ++-----------
   3 files changed, 6 insertions(+), 33 deletions(-)

Modified: trunk/boost/lockfree/queue.hpp
==============================================================================
--- trunk/boost/lockfree/queue.hpp Mon Oct 28 06:05:25 2013 (r86494)
+++ trunk/boost/lockfree/queue.hpp 2013-10-28 06:05:52 EDT (Mon, 28 Oct 2013) (r86495)
@@ -12,9 +12,6 @@
 #define BOOST_LOCKFREE_FIFO_HPP_INCLUDED
 
 #include <boost/assert.hpp>
-#ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS
-#include <boost/noncopyable.hpp>
-#endif
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/has_trivial_assign.hpp>
 #include <boost/type_traits/has_trivial_destructor.hpp>
@@ -76,9 +73,6 @@
 template <typename T, ...Options>
 #endif
 class queue
-#ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS
- : boost::noncopyable
-#endif
 {
 private:
 #ifndef BOOST_DOXYGEN_INVOKED
@@ -145,11 +139,8 @@
 
 #endif
 
-#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
- queue(queue const &) = delete;
- queue(queue &&) = delete;
- const queue& operator=( const queue& ) = delete;
-#endif
+ BOOST_DELETED_FUNCTION(queue(queue const&))
+ BOOST_DELETED_FUNCTION(queue& operator= (queue const&))
 
 public:
     typedef T value_type;

Modified: trunk/boost/lockfree/spsc_queue.hpp
==============================================================================
--- trunk/boost/lockfree/spsc_queue.hpp Mon Oct 28 06:05:25 2013 (r86494)
+++ trunk/boost/lockfree/spsc_queue.hpp 2013-10-28 06:05:52 EDT (Mon, 28 Oct 2013) (r86495)
@@ -15,9 +15,6 @@
 
 #include <boost/aligned_storage.hpp>
 #include <boost/assert.hpp>
-#ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS
-#include <boost/noncopyable.hpp>
-#endif
 #include <boost/static_assert.hpp>
 #include <boost/utility.hpp>
 
@@ -39,9 +36,6 @@
 
 template <typename T>
 class ringbuffer_base
-#ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS
- : boost::noncopyable
-#endif
 {
 #ifndef BOOST_DOXYGEN_INVOKED
     typedef std::size_t size_t;
@@ -50,11 +44,8 @@
     char padding1[padding_size]; /* force read_index and write_index to different cache lines */
     atomic<size_t> read_index_;
 
-#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
- ringbuffer_base(ringbuffer_base const &) = delete;
- ringbuffer_base(ringbuffer_base &&) = delete;
- const ringbuffer_base& operator=( const ringbuffer_base& ) = delete;
-#endif
+ BOOST_DELETED_FUNCTION(ringbuffer_base(ringbuffer_base const&))
+ BOOST_DELETED_FUNCTION(ringbuffer_base& operator= (ringbuffer_base const&))
 
 protected:
     ringbuffer_base(void):

Modified: trunk/boost/lockfree/stack.hpp
==============================================================================
--- trunk/boost/lockfree/stack.hpp Mon Oct 28 06:05:25 2013 (r86494)
+++ trunk/boost/lockfree/stack.hpp 2013-10-28 06:05:52 EDT (Mon, 28 Oct 2013) (r86495)
@@ -10,9 +10,6 @@
 #include <boost/assert.hpp>
 #include <boost/checked_delete.hpp>
 #include <boost/integer_traits.hpp>
-#ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS
-#include <boost/noncopyable.hpp>
-#endif
 #include <boost/static_assert.hpp>
 #include <boost/tuple/tuple.hpp>
 #include <boost/type_traits/has_trivial_assign.hpp>
@@ -66,9 +63,6 @@
 template <typename T, ...Options>
 #endif
 class stack
-#ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS
- : boost::noncopyable
-#endif
 {
 private:
 #ifndef BOOST_DOXYGEN_INVOKED
@@ -112,11 +106,8 @@
 
 #endif
 
-#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
- stack(stack const &) = delete;
- stack(stack &&) = delete;
- const stack& operator=( const stack& ) = delete;
-#endif
+ BOOST_DELETED_FUNCTION(stack(stack const&))
+ BOOST_DELETED_FUNCTION(stack& operator= (stack const&))
 
 public:
     typedef T value_type;


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