A PrimitiveTransform that transforms the child expressions of an expression node according to the corresponding children of a Grammar. More...
#include <pass_through.hpp>


Classes | |
| struct | impl | 
Public Types | |
| typedef pass_through< Grammar,  Domain >  | transform_type | 
Public Member Functions | |
| BOOST_PROTO_CALLABLE () typedef X proto_is_transform_ | |
| BOOST_FORCEINLINE  boost::proto::detail::apply_transform < transform_type(Expr const &)> ::result_type  | operator() (Expr &&e) const | 
| BOOST_FORCEINLINE  boost::proto::detail::apply_transform < transform_type(Expr const &, State const &)> ::result_type  | operator() (Expr &&e, State &&s) const | 
| BOOST_FORCEINLINE  boost::proto::detail::apply_transform < transform_type(Expr const &, State const &, Data const &)> ::result_type  | operator() (Expr &&e, State &&s, Data &&d) const | 
A PrimitiveTransform that transforms the child expressions of an expression node according to the corresponding children of a Grammar.
Given a Grammar such as plus<T0, T1>, an expression type that matches the grammar such as plus<E0, E1>::type, a state S and a data V, the result of applying the pass_through<plus<T0, T1> > transform is:
The above demonstrates how child transforms and child expressions are applied pairwise, and how the results are reassembled into a new expression node with the same tag type as the original.
The explicit use of pass_through<> is not usually needed, since the expression generator metafunctions such as plus<> have pass_through<> as their default transform. So, for instance, these are equivalent:
For example, consider the following transform that promotes all float terminals in an expression to double.
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited |