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

PrevUpHomeNext

Struct display_expr

boost::proto::functional::display_expr — Pretty-print a Proto expression tree.

Synopsis

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


struct display_expr {
  // types
  typedef void result_type;

  // construct/copy/destruct
  display_expr(std::ostream & = std::cout, int = 0);

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

Description

A PolymorphicFunctionObject which accepts a Proto expression tree and pretty-prints it to an ostream for debugging purposes.

display_expr public construct/copy/destruct

  1. display_expr(std::ostream & sout = std::cout, int depth = 0);

    Parameters:

    sout

    The ostream to which the expression tree will be written.

    depth

    The starting indentation depth for this node. Children nodes will be displayed at a starting depth of depth+4.

display_expr public member functions

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

PrevUpHomeNext