Boost logo

Boost :

Subject: Re: [boost] [proto] Problems with operator <<
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-08-26 14:08:22


>> Is there anything obvious I'm doing wrong here? I'm using VC10 BTW, and
>> big_number inherits from proto::terminal<big_number*> in case that makes
>> any difference.
>
> That last bit does make a difference. Proto grammar matching keys off
> the underlying proto expression type. So change this:
>
> proto::terminal<boost::math::big_number<proto::_> >
>
> to this:
>
> proto::terminal<big_number*>

I assume you mean

proto::terminal<big_number<proto::_>*>

but I still get get the same error messages (the same with all the
variations of the above I tried).

> (Not sure exactly what you mean by "big_number inherits from
> proto::terminal<big_number*>. You clearly don't mean that. You mean
> either i/ big_number extends proto::terminal<big_number*>::type or ii/
> big_number inherits from proto::terminal<big_number*>::type. Either way,
> the answer is the same.)

Ah yes, I meant proto::terminal<big_number<arg>*>::type.

Also changed the grammar to use the proto::switch_, and yes that is better,
well a bit anyway ;-)

Thanks, John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk