Re: How in the name of D do you deal with more than one optional template parameter?

2018-10-31 Thread aliak via Digitalmars-d-learn
On Tuesday, 30 October 2018 at 21:19:13 UTC, H. S. Teoh wrote: On Tue, Oct 30, 2018 at 08:46:31PM +, aliak via Digitalmars-d-learn wrote: [...] struct C(Args...) if ((rest.length == 2 && is(Args[0] == B!C, C) && is(Args[1] == string)) || (rest.length == 1 && (is(Args[0] ==

Re: How in the name of D do you deal with more than one optional template parameter?

2018-10-30 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Oct 30, 2018 at 08:46:31PM +, aliak via Digitalmars-d-learn wrote: > Hi, > > Do you guys have any strategies for dealing with templates when they > have more than one optional parameter? > > E.g let's say we have a type C that takes three parameters > > struct B(T) {} > struct