FUNCTION AS_CHILD(3)

NAME
boost::proto::as_child - A function that wraps non-Proto objects in Proto terminals (by reference) and leaves Proto expression types alone.

SYNOPSIS

// In header: <boost/proto/traits.hpp>
template<typename T>
  typename proto::result_of::as_child< T >::type as_child(T & t);
template<typename T>
  typename proto::result_of::as_child< T const >::type as_child(T const & t);
template<typename Domain, typename T>
  typename proto::result_of::as_child< T, Domain >::type as_child(T & t);
template<typename Domain, typename T>
  typename proto::result_of::as_child< T const, Domain >::type
  as_child(T const & t);

DESCRIPTION

The proto::as_child() function returns Proto expression objects that are suitable for storage as child nodes in an expression tree. It turns non-Proto objects into Proto terminals. Its behavior is domain-specific. By default, non-Proto types are held wrapped by reference in a new Proto terminal expression, and objects that are already Proto expressions are simply returned by reference.

If Domain is not explicitly specified, it is assumed to be proto::default_domain.

See proto::domain::as_child<> for a complete description of this function's default behavior.

Returns:
    typename Domain::template as_child< T >()(t).RE