$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r82706 - in trunk: boost/move libs/move/test
From: igaztanaga_at_[hidden]
Date: 2013-02-06 20:24:56
Author: igaztanaga
Date: 2013-02-03 15:42:26 EST (Sun, 03 Feb 2013)
New Revision: 82706
URL: http://svn.boost.org/trac/boost/changeset/82706
Log:
Fixes #7969
Text files modified: 
   trunk/boost/move/core.hpp     |    22 ++++++++++++++++------                  
   trunk/libs/move/test/move.cpp |     1 -                                       
   2 files changed, 16 insertions(+), 7 deletions(-)
Modified: trunk/boost/move/core.hpp
==============================================================================
--- trunk/boost/move/core.hpp	(original)
+++ trunk/boost/move/core.hpp	2013-02-03 15:42:26 EST (Sun, 03 Feb 2013)
@@ -18,6 +18,20 @@
 
 #include <boost/move/detail/config_begin.hpp>
 
+#ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS
+   #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \
+      private:\
+      TYPE(TYPE &);\
+      TYPE& operator=(TYPE &);\
+   //
+#else
+   #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \
+      public:\
+      TYPE(TYPE const &) = delete;\
+      TYPE& operator=(TYPE const &) = delete;\
+   //
+#endif   //BOOST_NO_CXX11_DELETED_FUNCTIONS
+
 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
 
    #include <boost/move/detail/meta_utils.hpp>
@@ -152,9 +166,7 @@
    //
    //////////////////////////////////////////////////////////////////////////////
    #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
-      private:\
-      TYPE(TYPE &);\
-      TYPE& operator=(TYPE &);\
+      BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
       public:\
       operator ::boost::rv<TYPE>&() \
       {  return *static_cast< ::boost::rv<TYPE>* >(this);  }\
@@ -210,11 +222,9 @@
    //! and assignment. The user will need to write a move constructor/assignment as explained
    //! in the documentation to fully write a movable but not copyable class.
    #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
+      BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
       public:\
       typedef int boost_move_emulation_t;\
-      private:\
-      TYPE(const TYPE &);\
-      TYPE& operator=(const TYPE &);\
    //
 
    //! This macro marks a type as copyable and movable.
Modified: trunk/libs/move/test/move.cpp
==============================================================================
--- trunk/libs/move/test/move.cpp	(original)
+++ trunk/libs/move/test/move.cpp	2013-02-03 15:42:26 EST (Sun, 03 Feb 2013)
@@ -108,7 +108,6 @@
       movable m2(boost::move(m));
       movable m3(move_return_function2());
         }
-   //limitations_test();
 
    return 0;
 }