
29 Jan
2009
29 Jan
'09
7:18 p.m.
"MaximYanchenko" <maximyanchenko@yandex.ru> wrote in message news:loom.20090128T054136-488@post.gmane.org...
It looks like this "when" matches everything (at least with my compiler), not only plus (as supposed to), for example it matches multiplication as well: proto::display_expr( var_ * 1 = 2 ); proto::display_expr( Solve()( var_ * 1 = 2 ) );
I think you're seeing the "undefined behavior" we've been discussing. Try adding the following check to your program and see if it asserts. BOOST_MPL_ASSERT(( proto::matches<BOOST_TYPEOF(var_ * 1 = 2 ), Solve>)); Regards, Dave Jenkins