| Home | Libraries | People | FAQ | More

## Function template assert_matches_not

boost::proto::assert_matches_not — Assert at compile time that a particular expression does not match the specified grammar.

## Synopsis

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

    template<typename Grammar, typename Expr>
      void assert_matches_not(Expr const & expr);

## Description

Use `proto::assert_matches_not()` to assert at compile-time that an expression does not match a grammar.

Example:

    typedef proto::plus< proto::terminal< int >, proto::terminal< int > > PlusInts;

    proto::assert_matches_not<PlusInts>( proto::lit("a string") + 42 );

See also:

- `proto::assert_matches()`
- `BOOST_PROTO_ASSERT_MATCHES()`
- `BOOST_PROTO_ASSERT_MATCHES_NOT()`

Notes: | Equivalent to `BOOST_MPL_ASSERT_NOT((proto::matches<Expr, Grammar>))`.