Boost C++ Libraries Home Libraries People FAQ More

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:

    depth

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

    sout

    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;

PrevUpHomeNext