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 nary_expr

boost::proto::nary_expr — A metafunction for generating n-ary expression types with a specified tag type, a grammar element for matching n-ary expressions, and a PrimitiveTransform that dispatches to the proto::pass_through<> transform.

Synopsis

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

template<typename Tag, typename... A> 
struct nary_expr :  proto::transform< nary_expr<Tag, A...> > {
  // types
  typedef proto::expr< Tag, proto::listN< A... > > type;           
  typedef type                                     proto_base_expr;

  // member classes/structs/unions
  template<typename Expr, typename State, typename Data> 
  struct impl :
     proto::pass_through<nary_expr>::template impl<Expr, State, Data>
  {
  };
};

Description

Use proto::nary_expr<proto::_, proto::vararg<proto::_> > as a grammar element to match any n-ary expression; that is, any non-terminal.


PrevUpHomeNext