![]() |
Home | Libraries | People | FAQ | More |
boost::proto::_default::impl
// In header: <boost/proto/transform/default.hpp> template<typename Expr, typename State, typename Data> struct impl : proto::transform_impl<Expr, State, Data> { // types typedef ; // For exposition only typedef ; // public member functions (, , ) ; // public data members static s_expr; // For exposition only static s_state; // For exposition only static s_data; // For exposition only };
Let
be the C++ operator
corresponding to OP
Expr::proto_tag
. (For example, if
Tag
is
proto::tag::plus
, let
be OP
+
.)
The behavior of this class is specified in terms of the C++0x decltype
keyword. In systems where this keyword is not available, Proto uses the Boost.Typeof library to
approximate the behavior.
impl
public
types
If Tag
corresponds to a unary prefix operator,
then the result type is
proto::child(
If Tag
corresponds to a unary postfix operator,
then the result type is
proto::child(
If Tag
corresponds to a binary infix operator,
then the result type is
proto::left(proto::right(
If Tag
is
proto::tag::subscript
,
then the result type is
proto::left(proto::right(
If Tag
is
proto::tag::if_else_
,
then the result type is
proto::child_c<proto::child_c<proto::child_c<
If Tag
is
proto::tag::function
,
then the result type is
proto::child_c<proto::child_c<proto::child_c<
impl
public member functions( expr, state, data) ;
proto::_default
<Grammar>::impl<Expr, State, Data>::operator()
If Tag
corresponds to a unary prefix operator,
then return
OP Grammar()(proto::child
(expr), state, data)
If Tag
corresponds to a unary postfix operator,
then return
Grammar()(proto::child
(expr), state, data) OP
If Tag
corresponds to a binary infix operator,
then return
Grammar()(proto::left
(expr), state, data) OP Grammar()(proto::right
(expr), state, data)
If Tag
is
,
then return
proto::tag::subscript
Grammar()(proto::left
(expr), state, data) [ Grammar()(proto::right
(expr), state, data) ]
If Tag
is
,
then return
proto::tag::if_else_
Grammar()(proto::child_c
<0>(expr), state, data) ? Grammar()(proto::child_c
<1>(expr), state, data) : Grammar()(proto::child_c
<2>(expr), state, data)
If Tag
is
,
then return
proto::tag::function
Grammar()(proto::child_c
<0>(expr), state, data) ( Grammar()(proto::child_c
<1>(expr), state, data), ... Grammar()(proto::child_c
<N>(expr), state, data) )