Boost C++ Libraries 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.

Struct display_expr

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


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;


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);



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


    The ostream to which the expression tree will be written.

display_expr public member functions

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