Home | Libraries | People | FAQ | More |
boost::proto::make_expr — Construct an expression of the requested tag type with a domain and with the specified arguments as children.
// In header: <boost/proto/make_expr.hpp> template<typename Tag, typename... A> typename proto::result_of::make_expr<Tag, A const...>::type const make_expr(A const &... a); template<typename Tag, typename Domain, typename... A> typename proto::result_of::make_expr<Tag, Domain, A const...>::type const make_expr(A const &... a);
This function template may be invoked either with or without specifying a
Domain
template parameter. If no domain is specified, the domain
is deduced by examining domains of the given arguments. See
for a full
description of the procedure used.
proto::deduce_domain
Let
be defined such that:
WRAP
(x)
If x
is a boost::reference_wrapper<>
,
is equivalent to
WRAP
(x)
.
proto::as_child
<Domain>(x.get())
Otherwise,
is equivalent to
WRAP
(x)
.
proto::as_expr
<Domain>(x)
If
is true, then let proto::wants_basic_expr
<typename Domain::proto_generator>::value
be
E
; otherwise,
let proto::basic_expr
be
E
.
proto::expr
Let
be defined as
MAKE
(Tag, b...)
.
E
<Tag,
proto::listN
<decltype(b)...> >::make(b...)
If Tag
is
, then return
proto::tag::terminal
.
WRAP
(a0)
Otherwise, return
Domain()(
.
MAKE
(Tag, WRAP
(a)...))