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 template not_

boost::proto::not_ — Inverts the set of expressions matched by a grammar. When used as a transform, proto::not_<> returns the current expression unchanged.

Synopsis

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

template<typename Grammar> 
struct not_ :  proto::transform<not_<Grammar> > {
  // types
  typedef not_ proto_grammar;

  // member classes/structs/unions
  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

If an expression type E does not match a grammar G, then E does match proto::not_<G>. For example, proto::not_<proto::terminal<proto::_> > will match any non-terminal.


PrevUpHomeNext