
Larry Evans <cppljevans@cox-internet.com> 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 www.boost-consulting.com