Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::proto::domainns_::domain< Generator, Grammar, Super >::as_child< T, IsExpr, Callable > Struct Template Reference

A unary MonomorphicFunctionObject that turns objects into Proto expression objects in this domain. More...

#include <domain.hpp>

Inheritance diagram for boost::proto::domainns_::domain< Generator, Grammar, Super >::as_child< T, IsExpr, Callable >:
Collaboration diagram for boost::proto::domainns_::domain< Generator, Grammar, Super >::as_child< T, IsExpr, Callable >:

Detailed Description

template<typename Generator, typename Grammar, typename Super>
template<typename T, typename IsExpr = void, typename Callable = proto::callable>
struct boost::proto::domainns_::domain< Generator, Grammar, Super >::as_child< T, IsExpr, Callable >

A unary MonomorphicFunctionObject that turns objects into Proto expression objects in this domain.

The as_child<> function object turns objects into Proto expressions, if they are not already, by making them Proto terminals held by reference. Objects that are already Proto expressions are simply returned by reference.

If wants_basic_expr<Generator>value is true, then let E be basic_expr; otherwise, let E be expr. Given an lvalue t of type T:

If T is not a Proto expression type the resulting terminal is Generator()(E<tag::terminal, term<T &> >::make(t)).

If T is a Proto expression type and its generator type is different from Generator, the result is Generator()(t).

Otherwise, the result is the lvalue t.


The documentation for this struct was generated from the following file: