Struct template generator

| Home | Libraries | People | FAQ | More

## Struct template generator

boost::proto::generator — A generator that wraps expressions passed to it in the specified extension wrapper.

## Synopsis

    template<template< typename > class Extends>
    struct generator {
      template<typename This, typename Expr>
      struct result<This(Expr)> {
        // types
        typedef Extends< Expr > type;
      };

      // public member functions
      template<typename Expr> Extends< Expr > operator()(Expr const &) const;
    };

## Description

Generators are intended for use as the first template parameter to the `proto::domain<>` class template and control if and how expressions within that domain are to be customized. `proto::generator<>` wraps each expression passed to it in the `Extends<>` wrapper.

### `generator` public member functions

1.     template<typename Expr> Extends< Expr > operator()(Expr const & expr) const;

   Parameters:

   `expr` | A Proto expression

   Returns: | `Extends<Expr>(expr)`