FUNCTION TEM(3)

NAME
boost::proto::assert_matches - Assert at compile time that a particular expression matches the specified grammar.

SYNOPSIS

// In header: <boost/proto/debug.hpp>
template<typename Grammar, typename Expr>
  void assert_matches(Expr const & expr);

DESCRIPTION

Use proto::assert_matches() to assert at compile-time that an expression matches a grammar.

Example:

    typedef proto::plus< proto::terminal< int >, proto::terminal< int > > PlusInts;
    proto::assert_matches<PlusInts>( proto::lit(1) + 42 );

See also:

    &#8226; proto::assert_matches_not().RE

        &#8226; BOOST_PROTO_ASSERT_MATCHES().RE

            &#8226; BOOST_PROTO_ASSERT_MATCHES_NOT().RE

        Notes:
            Equivalent to BOOST_MPL_ASSERT((proto::matches<Expr, Grammar>)).