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

Click here to view the latest version of this page.
PrevUpHomeNext

Struct template nullary_expr

boost::proto::nullary_expr — A metafunction for generating nullary expression types, a grammar element for matching nullary expressions, and a PrimitiveTransform that returns the current expression unchanged.

Synopsis

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

template<typename Tag, typename T> 
struct nullary_expr :  proto::transform< nullary_expr<Tag, T> > {
  // types
  typedef proto::expr< Tag, proto::term< T > > type;           
  typedef type                                 proto_base_expr;
  template<typename Expr, typename State, typename Data> 
  struct impl :  proto::transform_impl< Expr, State, Data > {
    // types
    typedef Expr result_type;

    // public member functions
    Expr operator()(typename impl::expr_param, typename impl::state_param, 
                    typename impl::data_param) const;
  };
};

Description

Use proto::nullary_expr<proto::_, proto::_> as a grammar element to match any nullary expression.


PrevUpHomeNext