|
#define | BOOST_CATCH_CONST_RLVALUE(TYPE) const TYPE & \ |
|
#define | BOOST_COPY_ASSIGN_REF(TYPE) const TYPE & \ |
|
#define | BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2) const TYPE<ARG1, ARG2> & \ |
|
#define | BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3) const TYPE<ARG1, ARG2, ARG3>& \ |
|
#define | BOOST_COPY_ASSIGN_REF_BEG const \ |
|
#define | BOOST_COPY_ASSIGN_REF_END & \ |
|
#define | BOOST_COPYABLE_AND_MOVABLE(TYPE) |
|
#define | BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE) |
|
#define | BOOST_FWD_REF(TYPE) TYPE && \ |
|
#define | BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE) |
|
#define | BOOST_MOVE_BASE(BASE_TYPE, ARG) ::boost::move((BASE_TYPE&)(ARG)) |
| defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) More...
|
|
#define | BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) |
|
#define | BOOST_MOVE_RET(RET_TYPE, REF) REF |
|
#define | BOOST_RV_REF(TYPE) TYPE && \ |
|
#define | BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2) TYPE<ARG1, ARG2> && \ |
|
#define | BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3) TYPE<ARG1, ARG2, ARG3> && \ |
|
#define | BOOST_RV_REF_BEG \ |
|
#define | BOOST_RV_REF_END && \ |
|
This header implements macros to define movable classes and move-aware functions
Definition in file core.hpp.
#define BOOST_MOVE_BASE |
( |
|
BASE_TYPE, |
|
|
|
ARG |
|
) |
| ::boost::move((BASE_TYPE&)(ARG)) |
defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
This macro is used to achieve portable optimal move constructors.
When implementing the move constructor, in C++03 compilers the moved-from argument must be cast to the base type before calling boost::move()
due to rvalue reference limitations.
In C++11 compilers the cast from a rvalue reference of a derived type to a rvalue reference of a base type is implicit.
Definition at line 437 of file core.hpp.
#define BOOST_MOVE_RET |
( |
|
RET_TYPE, |
|
|
|
REF |
|
) |
| REF |
This macro is used to achieve portable move return semantics. The C++11 Standard allows implicit move returns when the object to be returned is designated by a lvalue and:
- The criteria for elision of a copy operation are met OR
- The criteria would be met save for the fact that the source object is a function parameter
For C++11 conforming compilers this macros only yields to REF: return BOOST_MOVE_RET(RET_TYPE, REF);
-> return REF;
For compilers without rvalue references this macro does an explicit move if the move emulation is activated and the return type (RET_TYPE) is not a reference.
For non-conforming compilers with rvalue references like Visual 2010 & 2012, an explicit move is performed if RET_TYPE is not a reference.
Caution: When using this macro in non-conforming or C++03 compilers, a move will be performed even if the C++11 standard does not allow it (e.g. returning a static variable). The user is responsible for using this macro only to return local objects that met C++11 criteria.
Definition at line 392 of file core.hpp.