Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-02-28 17:02:15


On 02/28/2005 10:01 AM, David Abrahams wrote:
[snip]
>>
> That's misguided it seems to me. Your tuple_type is not a
> specialization of fold. Are you really interested in making
> specializations of fold into sequences?
>
> You're folding some kind of cons cell, right? Don't you want to
> implement begin and end on that?
>
> template <class A, class B>
> struct begin<inherit<A,B> >
> {
> ...
> };
>
> or something?
Yes. But how do I know what A or B is. It has to be the result
of size<Sequence>-1 applications of ForwardOp. Is there a way to
get this other than fold<Sequence,StartState,ForwardOp>::type ?
Hmmm. This is what get_side_type does with Index == 0. Maybe
I could use that.

BTW, get_side_type is also in vault.

[snip]
>>My other post mentioned visitors.hpp and its need for fold.
>>How could fusion's tuple be used to implement visitors where
>>the critical need is a StartState superclass for all instantiations
>>of ForwardOp?
>
>
> I'm not the guy to ask, sorry. Joel is the fusion expert, and... I
> mean no offense by this, but I find your code hard to read and
> understand, so I'm trying to be helpful while not getting entangled in
> looking at its details because I think it will cost me too much time.

OK. Thanks for the help :)


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