|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77483 - trunk/boost/move
From: igaztanaga_at_[hidden]
Date: 2012-03-22 14:51:39
Author: igaztanaga
Date: 2012-03-22 14:51:38 EDT (Thu, 22 Mar 2012)
New Revision: 77483
URL: http://svn.boost.org/trac/boost/changeset/77483
Log:
Added BOOST_RV_REF_BEG and BOOST_RV_REF_END macros to ease declaring rvalues of template classes
Text files modified:
trunk/boost/move/move.hpp | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
Modified: trunk/boost/move/move.hpp
==============================================================================
--- trunk/boost/move/move.hpp (original)
+++ trunk/boost/move/move.hpp 2012-03-22 14:51:38 EDT (Thu, 22 Mar 2012)
@@ -350,6 +350,15 @@
::boost::rv< TYPE<ARG1, ARG2, ARG3> >& \
//
+ #define BOOST_RV_REF_BEG\
+ ::boost::rv< \
+ //
+
+ #define BOOST_RV_REF_END\
+ >& \
+ //
+
+
#define BOOST_FWD_REF(TYPE)\
const TYPE & \
@@ -569,6 +578,25 @@
TYPE && \
//
+ //!This macro is used to achieve portable syntax in move
+ //!constructors and assignments for template classes marked as
+ //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE.
+ //!As macros have problem with comma-separatd template arguments,
+ //!the template argument must be preceded with BOOST_RV_REF_START
+ //!and ended with BOOST_RV_REF_END
+ #define BOOST_RV_REF_BEG\
+ \
+ //
+
+ //!This macro is used to achieve portable syntax in move
+ //!constructors and assignments for template classes marked as
+ //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE.
+ //!As macros have problem with comma-separatd template arguments,
+ //!the template argument must be preceded with BOOST_RV_REF_START
+ //!and ended with BOOST_RV_REF_END
+ #define BOOST_RV_REF_END\
+ && \
+
//!This macro is used to achieve portable syntax in copy
//!assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE.
#define BOOST_COPY_ASSIGN_REF(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