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 an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template as_child

boost::proto::result_of::as_child — A metafunction that computes the return type of the proto::as_child() function.

Synopsis

// In header: <boost/proto/traits.hpp>

template<typename T, typename Domain = proto::default_domain> 
struct as_child {
  // types
  typedef see-below type;
};

Description

The proto::result_of::as_child<> metafunction turns types into Proto types if they are not already by making them Proto terminals held by reference. Types which are already Proto types are left alone.

When T is not yet a Proto type, the result type proto::result_of::as_child<T, Domain>::type is boost::result_of<Domain(proto::expr< proto::tag::terminal, proto::term<T &> >)>::type.

When T is already a Proto type The result type proto::result_of::as_child<T, Domain>::type is T &.


PrevUpHomeNext