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 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.


template<typename Grammar> 
struct not_ :  proto::transform<not_<Grammar> > {
  // types
  typedef not_ 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
    typename impl::expr_param 
    operator()(typename impl::expr_param, typename impl::state_param, 
               typename impl::data_param) const;


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.