
19 Apr
2007
19 Apr
'07
5:35 p.m.
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 www.boost-consulting.com