Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] implementing an computer algebra systemwith proto
From: Dave Jenkins (david_at_[hidden])
Date: 2009-01-29 14:18:10


"MaximYanchenko" <maximyanchenko_at_[hidden]> wrote in message
news:loom.20090128T054136-488_at_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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net