| Home | Libraries | People | FAQ | More

## Struct reverse

boost::proto::functional::reverse — A PolymorphicFunctionObject type that invokes the `fusion::reverse()` algorithm on its argument.

## Synopsis

    // In header: <boost/proto/fusion.hpp>

    struct reverse :  proto::callable {
      // member classes/structs/unions
      template<typename This, typename Expr>
      struct result<This(Expr)> :  result< This(Expr const &) > {
      };
      template<typename This, typename Expr>
      struct result<This(Expr &)> :  fusion::result_of::reverse< Expr > {
      };

      // public member functions
      template<typename Expr>
        typename fusion::result_of::reverse< Expr >::type operator()(Expr &) const;
      template<typename Expr>
        typename fusion::result_of::reverse< Expr const >::type
        operator()(Expr const &) const;
    };

## Description

A PolymorphicFunctionObject type that invokes the `fusion::reverse()` algorithm on its argument. This is useful for defining a CallableTransform like `reverse(_)`, which reverses the order of the children of a Proto expression node.

### `reverse` public member functions

1.     template<typename Expr>
         typename fusion::result_of::reverse< Expr >::type
         operator()(Expr & expr) const;

   Returns: | `fusion::reverse(expr)`

2.     template<typename Expr>
         typename fusion::result_of::reverse< Expr const >::type
         operator()(Expr const & expr) const;

   Returns: | `fusion::reverse(expr)`