Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function template forward

boost::forward

Synopsis

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


template<typename T> output_reference forward(input_reference);

Description

This function provides limited form of forwarding that is usually enough for in-place construction and avoids the exponential overloading necessary for perfect forwarding in C++03.

For compilers with rvalue references this function provides perfect forwarding.

Otherwise: If input_reference binds to const ::boost::rv<T> & then it output_reference is ::boost::rev<T> &

Else, input_reference is equal to output_reference is equal to input_reference.


PrevUpHomeNext