![]() |
Home | Libraries | People | FAQ | More |
boost::proto::expr — Representation of a node in an expression tree.
// In header: <boost/proto/expr.hpp> template<typename Tag, typename Args, Arity = > struct expr { // types typedef ; typedef ; typedef ; typedef proto::default_domain ; typedef proto::basic_expr< ; typedef ; typedef ; typedef; // For each
N
in[0,max(Arity,1))
. // member classes/structs/unions template<typename Signature> struct result { // types typedef; }; // public static functions template<typename... A> (...); // public member functions (); () ; template<typename A>
(); template<typename A>
(); template<typename A>
() ; template<typename A>
() ; template<typename A>
(); template<typename A>
(); template<typename A>
() ; template<typename A>
() ; template<typename... A>
(...); template<typename... A>
(...) ; // public data members
childN; // For each
N
in[0,max(Arity,1))
. static proto_arity_c; //= Arity;
};
proto::expr<>
is a node in an expression
template tree. It is a container for its child sub-trees. It also serves as the
terminal nodes of the tree.
Tag
is type that represents the operation
encoded by this expression. It is typically one of the structs in the
boost::proto::tag
namespace, but it doesn't
have to be. If Arity
is 0 then this
expr<>
type represents a leaf in the
expression tree.
Args
is a list of types representing
the children of this expression. It is an instantiation of one of
proto::list1<>
,
proto::list2<>
,
etc. The child types
must all themselves be either proto::expr<>
or proto::basic_expr<>&
(or extensions thereof via
proto::extends<>
or
BOOST_PROTO_EXTENDS()
), unless
Arity
is 0, in which case
Args
must be
proto::term<T>
, where
T
can be any type.
proto::expr<>
is a valid Fusion
random-access sequence, where the elements of the sequence are the child
expressions.
expr
public member functions();
Returns: |
|
() ;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A>
( a);
Lazy assignment expression
Returns: |
A new expression node representing the assignment operation. |
template<typename A>
( a);
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A>
( a) ;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A>
( a) ;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A>
( a);
Lazy subscript expression
Returns: |
A new expression node representing the subscript operation. |
template<typename A>
( a);
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A>
( a) ;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A>
( a) ;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename... A>
(... a);
Lazy function call
Returns: |
A new expression node representing the function call operation. |
template<typename... A>
(... a) ;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.