Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-04-19 13:35:09

Larry Evans wrote:
> On 04/19/2007 11:46 AM, Eric Niebler wrote:
> [snip]
>> Oh! You're chaining or_'s together. Sure, that works. So for your
>> initial state, all you need is a pattern that never matches anything.
>> For that, you can use proto::not<proto::_>.
> I couldn't get that to compile; however, proto::logical_not<proto::_>
> does. Thanks.

proto::not_<> is a fairly recent addition. Be sure you're sync'ed up.
logical_not<_> is certainly not what you want here. It will successfully
match proto expressions such as !as_expr('a'). You want something that
will never match anything. You could also use
proto::if_<mpl::always<mpl::false_> >.

Eric Niebler
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at