Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-02-28 20:35:03

Larry Evans <cppljevans_at_[hidden]> writes:

> 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.


At the point of ... the compiler knows what they are

> It has to be the result
> of size<Sequence>-1 applications of ForwardOp.

Do you mean that you want to restrict the partial specialization
matching to only match your tuple types? You don't have to use
inherit directly, you know; you could just derive your own my_inherit
class from it and match that in the partial specialization. If you
only use my_inherit to build these tuples, you're home free.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at