On Monday, 5 August 2013 at 18:45:49 UTC, kdmult wrote:
class A(P...) {}

class B(R = A!P, P...) {}

P... should be rightmost, so how can I use it in the preceding parameter?

The default parameter value doesn't make sense as it's shown above.
Actually I want to port C++ code which looks like below.

template <typename P1>
class A1 {};
template <typename P1, typename R=A1<P1> >
class B1 {}

template <typename P1, typename P2>
class A2 {};
template <typename P1, typename P2, typename R=A2<P1,P2> >
class B2 {}

and so on.

I would use the variadic template parameters. However, I have no idea how it can be done. Please advise.

Thanks.

Reply via email to