Definition of the proto::make_expr() and proto::unpack_expr() utilities for building Proto expression nodes from child nodes or from a Fusion sequence of child nodes, respectively. A PolymorphicFunctionObject equivalent to the proto::make_expr() function. In all cases, proto::functional::make_expr<Tag, Domain>()(a...) is equivalent to proto::make_expr<Tag, Domain>(a...). proto::functional::make_expr<Tag>()(a...) is equivalent to proto::make_expr<Tag>(a...). proto::callable This(A...) proto::result_of::make_expr< Tag, Domain, A... > typename proto::result_of::make_expr< Tag, Domain, A const... >::type const A const & Construct an expression node with tag type Tag and in the domain Domain. proto::make_expr<Tag, Domain>(a...) A PolymorphicFunctionObject equivalent to the proto::unpack_expr() function. In all cases, proto::functional::unpack_expr<Tag, Domain>()(seq) is equivalent to proto::unpack_expr()<Tag, Domain>(seq). proto::functional::unpack_expr<Tag>()(seq) is equivalent to proto::unpack_expr()<Tag>(seq). proto::callable This(Sequence) proto::result_of::unpack_expr< Tag, Domain, typename boost::remove_reference< Sequence >::type > typename proto::result_of::unpack_expr< Tag, Domain, Sequence const >::type const Sequence const & A Fusion Forward Sequence Construct an expression node with tag type Tag and in the domain Domain. proto::unpack_expr<Tag, Domain>(sequence) Metafunction that computes the return type of the proto::make_expr() function, with a domain deduced from the domains of the children. Computes the return type of the proto::make_expr() function. In this specialization, the domain is deduced from the domains of the child types. If proto::is_domain<A0>::value is true, then another specialization is selected. For exposition only domain-deduced-from-child-types In this specialization, Proto uses the domains of the child expressions to compute the domain of the parent. See proto::deduce_domain for a full description of the procedure used. typename proto::result_of::make_expr<Tag, D, A...>::type Tag Domain A Metafunction that computes the return type of the proto::make_expr() function, within the specified domain. Computes the return type of the proto::make_expr() function. Let WRAP<X> be defined such that: If X is Y & or (possibly cv-qualified) boost::reference_wrapper<Y>, then WRAP<X> is equivalent to proto::result_of::as_child<Y, Domain>. Otherwise, WRAP<X> is equivalent to proto::result_of::as_expr<X, Domain>. If proto::wants_basic_expr<typename Domain::proto_generator>::value is true, then let E be proto::basic_expr; otherwise, let E be proto::expr. If Tag is proto::tag::terminal, then type is a typedef for typename WRAP<A0>::type. Otherwise, type is a typedef for boost::result_of<Domain(E< Tag, proto::listN< typename WRAP<A>::type...> >)>::type see-below Metafunction that computes the return type of the proto::unpack_expr() function, with a domain deduced from the domains of the children. Compute the return type of the proto::unpack_expr() function. Sequence is a Fusion Forward Sequence. In this specialization, the domain is deduced from the domains of the child types. If proto::is_domain<Sequence>::value is true, then another specialization is selected. Where S is a Fusion RandomAccessSequence equivalent to Sequence, and N is the size of S. typename proto::result_of::make_expr< Tag, typename fusion::result_of::value_at_c<S, 0>::type, ... typename fusion::result_of::value_at_c<S, N-1>::type >::type Tag Domain Sequence Metafunction that computes the return type of the proto::unpack_expr() function, within the specified domain. Computes the return type of the proto::unpack_expr() function. Where S is a RandomAccessSequence equivalent to Sequence, and N is the size of S. typename proto::result_of::make_expr< Tag, Domain, typename fusion::result_of::value_at_c<S, 0>::type, ... typename fusion::result_of::value_at_c<S, N-1>::type >::type typename proto::result_of::make_expr<Tag, A const...>::type const A const & typename proto::result_of::make_expr<Tag, Domain, A const...>::type const A const & Construct an expression of the requested tag type with a domain and with the specified arguments as children. 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 proto::deduce_domain for a full description of the procedure used. Let WRAP(x) be defined such that: If x is a boost::reference_wrapper<>, WRAP(x) is equivalent to proto::as_child<Domain>(x.get()). Otherwise, WRAP(x) is equivalent to proto::as_expr<Domain>(x). If proto::wants_basic_expr<typename Domain::proto_generator>::value is true, then let E be proto::basic_expr; otherwise, let E be proto::expr. Let MAKE(Tag, b...) be defined as E<Tag, proto::listN<decltype(b)...> >::make(b...). If Tag is proto::tag::terminal, then return WRAP(a0). Otherwise, return Domain()(MAKE(Tag, WRAP(a)...)). typename proto::result_of::unpack_expr<Tag, Sequence const>::type const Sequence const & A Fusion Forward Sequence. typename proto::result_of::unpack_expr<Tag, Domain, Sequence const>::type const Sequence const & Construct an expression of the requested tag type with a domain and with children from the specified Fusion Forward 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 proto::deduce_domain for a full description of the procedure used. Let s be a Fusion RandomAccessSequence equivalent to sequence. Let WRAP(N, s) be defined such that: If fusion::result_of::value_at_c<decltype(s),N>::type is a reference type or an instantiation of boost::reference_wrapper<>, WRAP(N, s) is equivalent to proto::as_child<Domain>(fusion::at_c<N>(s)). Otherwise, WRAP(N, s) is equivalent to proto::as_expr<Domain>(fusion::at_c<N>(s)). If proto::wants_basic_expr<typename Domain::proto_generator>::value is true, then let E be proto::basic_expr; otherwise, let E be proto::expr. Let MAKE(Tag, b...) be defined as E<Tag, proto::listN<decltype(b)...> >::make(b...). If Tag is proto::tag::terminal, then return WRAP(0, s). Otherwise, return Domain()(MAKE(Tag, WRAP(0, s),... WRAP(N-1, s))), where N is the size of Sequence.