| Home | Libraries | People | FAQ | More

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

    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;
      };
    };

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