
6 Jan
2009
6 Jan
'09
12:15 a.m.
Hi all, i have a question and a problem. The problem is that i would like to write code like: domain=Domain([0,1]*[0,1]); where Domain([0,1]*[0,1]) is an expression created with proto. But of course this line of code is illegal, because i have to provide the type of this expression Domain([0,1]*[0,1]). So i have to write something like this: Domain([0,1]*[0,1])::type domain=Domain([0,1]*[0,1]); Is this correct? Now the question: To avoid code like above is this what the macro BOOST_PROTO_AUTO is for? Can i write BOOST_PROTO_AUTO( domain,Domain([0,1]*[0,1]) ); . Thanks in advance, Kim Tang