![]() |
Home | Libraries | People | FAQ | More |
boost::proto::unpack_expr — Construct an expression of the requested tag type with a domain and with children from the specified Fusion Forward Sequence.
// In header: <boost/proto/make_expr.hpp> template<typename Tag, typename Sequence> typename proto::result_of::unpack_expr<Tag, Sequence const>::type const unpack_expr(Sequence const & sequence); template<typename Tag, typename Domain, typename Sequence> typename proto::result_of::unpack_expr<Tag, Domain, Sequence const>::type const unpack_expr(Sequence const & sequence);
This function template may be invoked either with or without specifying a
Domain argument. If no domain is specified, the domain
is deduced by examining domains of each element of the sequence. See
for a full
description of the procedure used.
proto::deduce_domain
Let s be a Fusion RandomAccessSequence equivalent to
sequence.
Let be defined such that:
WRAP(N, s)
If fusion::result_of::value_at_c<decltype(s),N>::type is a reference type
or an instantiation of boost::reference_wrapper<>,
is equivalent to
WRAP(N, s).
proto::as_child<Domain>(fusion::at_c<N>(s))
Otherwise, is equivalent to
WRAP(N, s).
proto::as_expr<Domain>(fusion::at_c<N>(s))
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(0, s)
Otherwise, return
Domain()(, where
MAKE(Tag, WRAP(0, s),...
WRAP(N-1, s)))N is the size of Sequence.
Parameters: |
|