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 template pod_generator

boost::proto::pod_generator — A generator that wraps expressions passed to it in the specified extension wrapper and uses aggregate initialization for the wrapper.

Synopsis

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

template<template< typename > class Extends> 
struct pod_generator :  proto::callable {
  // member classes/structs/unions
  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::pod_generator<> wraps each expression passed to it in the Extends<> wrapper, and uses aggregate initialzation for the wrapped object.

pod_generator public member functions

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

    Parameters:

    expr

    A Proto expression

    Returns:

    Extends<Expr> that = {expr}; return that;


PrevUpHomeNext