On 12/25/2010 6:39 AM, Hossein Haeri wrote:
Hi Eric,
Thank you for confirming the error. But, more than having it confirmed,
I was looking for what's going wrong there. Especially, how do I
demystify the error message? What is it saying basically?
Merry Christmas, BTW! :)
If you look at line 61 of cons.hpp, you see this:
template
struct cons : sequence_base >
{
typedef mpl::int_Cdr::size::value+1 size;
--------------------------^^^^^^^^^
If you instantiate cons with boost::proto::_state as the Cdr parameter,
you'll get the error you saw because _state doesn't have a nested "size"
type. So somehow, Proto is instantiating cons prematurely, or else
Proto's evaluation engine failed to replace _state with the right thing
before instantiating cons.
It's either a Proto bug that got fixed sometime between then and now, or
else a compiler bug that has been worked around. Probably the former.
Merry Christmas!
--
Eric Niebler
BoostPro Computing
http://www.boostpro.com