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 master branch, built from commit b9ab49fc70.
PrevUpHomeNext

Function template value

boost::yap::value

Synopsis

// In header: <boost/yap/algorithm.hpp>


template<typename T> decltype(auto) constexpr value(T && x);

Description

Forwards the sole element of x to the caller, possibly calling deref() first if x is a reference expression, or forwards x to the caller unchanged.

More formally:

  • If x is not an expression, x is forwarded to the caller.

  • Otherwise, if x is a reference expression, the result is value(deref(x)).

  • Otherwise, if x is an expression with only one value (a unary expression or a terminal expression), the result is the forwarded first element of x.

  • Otherwise, x is forwarded to the caller.


PrevUpHomeNext