Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct default_generator

boost::proto::default_generator — A simple generator that passes an expression through unchanged.

Synopsis

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


struct default_generator :  proto::callable {
  // member classes/structs/unions
  template<typename This, typename Expr> 
  struct result<This(Expr)> {
    // types
    typedef Expr type;
  };

  // public member functions
  template<typename Expr> 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. The proto::default_generator makes no modifications to the expressions passed to it.

default_generator public member functions

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

    Parameters:

    expr

    A Proto expression

    Returns:

    expr


PrevUpHomeNext