A unary MonomorphicFunctionObject that turns objects into Proto expression objects in this domain. More...
#include <domain.hpp>
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
.