Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Macro BOOST_MOVE_BASE

BOOST_MOVE_BASE

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