Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Macro BOOST_MOVE_BASE

BOOST_MOVE_BASE — defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)

Synopsis

// In header: <boost/move/core.hpp>

BOOST_MOVE_BASE(BASE_TYPE, ARG)

Description

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.


PrevUpHomeNext