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 a snapshot of the develop branch, built from commit 3785d1f795.
PrevUpHomeNext

Function template move_if_noexcept

boost::move_if_noexcept

Synopsis

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


template<typename T> 
  rvalue_reference_or_const_lvalue_reference move_if_noexcept(input_reference);

Description

This function provides a way to convert a reference into a rvalue reference in compilers with rvalue references. For other compilers converts T & into ::boost::rv<T> & so that move emulation is activated. Reference would be converted to rvalue reference only if input type is nothrow move constructible or if it has no copy constructor. In all other cases const reference would be returned


PrevUpHomeNext