| Home | Libraries | People | FAQ | More

## Struct template impl

boost::proto::call::impl

## Synopsis

    template<typename Expr, typename State, typename Data>
    struct impl :  proto::transform_impl<Expr, State, Data> {
      // types
      typedef see-below result_type;

      // public member functions
      result_type operator()(typename impl::expr_param,
                             typename impl::state_param,
                             typename impl::data_param) const;
    };

## Description

### `impl` public types

1. typedef `see-below` result_type;

   `proto::call<T>::impl<Expr,State,Data>::result_type` is computed as follows:

   - If `T` if of the form `PrimitiveTransform` or `PrimitiveTransform()`, then `result_type` is:

         typename boost::result_of<PrimitiveTransform(Expr, State, Data)>::type

   - If `T` is of the form `PrimitiveTransform(T0)`, then `result_type` is:

         typename boost::result_of<PrimitiveTransform(
           typename boost::result_of<when<_,T0>(Expr, State, Data)>::type,
           State,
           Data
         )>::type

   - If `T` is of the form `PrimitiveTransform(T0, T1)`, then `result_type` is:

         typename boost::result_of<PrimitiveTransform(
           typename boost::result_of<when<_,T0>(Expr, State, Data)>::type,
           typename boost::result_of<when<_,T1>(Expr, State, Data)>::type,
           Data
         )>::type

   - If `T` is of the form `PrimitiveTransform(T0, T1, T2)`, then `result_type` is:

         typename boost::result_of<PrimitiveTransform(
           typename boost::result_of<when<_,T0>(Expr, State, Data)>::type,
           typename boost::result_of<when<_,T1>(Expr, State, Data)>::type,
           typename boost::result_of<when<_,T2>(Expr, State, Data)>::type
         )>::type

   - If `T` is of the form `PolymorphicFunctionObject(T0,...TN)`, then `result_type` is:

         typename boost::result_of<PolymorphicFunctionObject(
           typename boost::result_of<when<_,T0>(Expr, State, Data)>::type,
           ...
           typename boost::result_of<when<_,TN>(Expr, State, Data)>::type
         >::type

### `impl` public member functions

1.     result_type operator()(typename impl::expr_param expr,
                              typename impl::state_param state,
                              typename impl::data_param data) const;

   `proto::call<T>::impl<Expr,State,Data>::operator()` behaves as follows:

   - If `T` if of the form `PrimitiveTransform` or `PrimitiveTransform()`, then return

         PrimitiveTransform()(expr, state, data)

   - If `T` is of the form `PrimitiveTransform(T0)`, then return

         PrimitiveTransform()(
           when<_,T0>()(expr, state, data),
           state,
           sata
         )

   - If `T` is of the form `PrimitiveTransform(T0, T1)`, then return:

         PrimitiveTransform()(
           when<_,T0>()(expr, state, data),
           when<_,T1>()(expr, state, data),
           Data
         )

   - If `T` is of the form `PrimitiveTransform(T0, T1, T2)`, then return

         PrimitiveTransform()(
           when<_,T0>()(expr, state, data),
           when<_,T1>()(expr, state, data),
           when<_,T2>()(expr, state, data)
         )

   - If `T` is of the form `PolymorphicFunctionObject(T0,...TN)`, then return:

         PolymorphicFunctionObject()(
           when<_,T0>()(expr, state, data),
           ...
           when<_,TN>()(expr, state, data)
         )