mirror of
https://github.com/boostorg/move.git
synced 2025-07-31 21:04:27 +02:00
Container, Interprocess, Intrusive, Move merge for 1.54
[SVN r84341]
This commit is contained in:
@@ -18,6 +18,21 @@
|
||||
|
||||
#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;\
|
||||
private:\
|
||||
//
|
||||
#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 +167,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 +223,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.
|
||||
@@ -228,6 +239,8 @@
|
||||
//
|
||||
#endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
|
||||
namespace boost {
|
||||
|
||||
//!This trait yields to a compile-time true boolean if T was marked as
|
||||
//!BOOST_MOVABLE_BUT_NOT_COPYABLE or BOOST_COPYABLE_AND_MOVABLE and
|
||||
//!rvalue references are not available on the platform. False otherwise.
|
||||
@@ -237,6 +250,8 @@
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
} //namespace boost{
|
||||
|
||||
//!This macro is used to achieve portable syntax in move
|
||||
//!constructors and assignments for classes marked as
|
||||
//!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE
|
||||
@@ -299,7 +314,7 @@
|
||||
//
|
||||
|
||||
#define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
|
||||
TYPE<ARG1, ARG2, ARG3>& \
|
||||
const TYPE<ARG1, ARG2, ARG3>& \
|
||||
//
|
||||
|
||||
#define BOOST_CATCH_CONST_RLVALUE(TYPE)\
|
||||
|
Reference in New Issue
Block a user