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

Click here to view the latest version of this page.
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