Re: Aliasing arguments in the template parameter list of an is-expression

2014-03-18 Thread Meta
On Tuesday, 18 March 2014 at 19:18:23 UTC, anonymous wrote: See the rest of my message. Right, I was afraid this was the case.

Re: Aliasing arguments in the template parameter list of an is-expression

2014-03-18 Thread anonymous
On Tuesday, 18 March 2014 at 18:58:04 UTC, Meta wrote: On Tuesday, 18 March 2014 at 17:38:26 UTC, anonymous wrote: [...] Since left and right are alias parameters, you need "alias" in the is expression, too: --- if (is(P == Pair!(left, right), alias left, alias right) && /* etc */) --- Ye

Re: Aliasing arguments in the template parameter list of an is-expression

2014-03-18 Thread Meta
On Tuesday, 18 March 2014 at 17:38:26 UTC, anonymous wrote: On Tuesday, 18 March 2014 at 16:02:26 UTC, Meta wrote: I'd like to have the arguments of the template parameter list of an is-expression to be visible outside that is-expression, but I can't figure out a way to get an alias to them. Is

Re: Aliasing arguments in the template parameter list of an is-expression

2014-03-18 Thread Ali Çehreli
On 03/18/2014 10:44 AM, anonymous wrote: On Tuesday, 18 March 2014 at 17:07:01 UTC, Ali Çehreli wrote: On 03/18/2014 09:02 AM, Meta wrote: [...] struct Pair(alias left, alias right) {} template Left(P) if (is(P == Pair!(left, right), left, right) && is(typeof(left) == int) && is(typeo

Re: Aliasing arguments in the template parameter list of an is-expression

2014-03-18 Thread anonymous
On Tuesday, 18 March 2014 at 17:07:01 UTC, Ali Çehreli wrote: On 03/18/2014 09:02 AM, Meta wrote: [...] struct Pair(alias left, alias right) {} template Left(P) if (is(P == Pair!(left, right), left, right) && is(typeof(left) == int) && is(typeof(right) == int)) Too many typeofs there

Re: Aliasing arguments in the template parameter list of an is-expression

2014-03-18 Thread anonymous
On Tuesday, 18 March 2014 at 16:02:26 UTC, Meta wrote: I'd like to have the arguments of the template parameter list of an is-expression to be visible outside that is-expression, but I can't figure out a way to get an alias to them. Is something like this possible? struct Pair(alias left, ali

Re: Aliasing arguments in the template parameter list of an is-expression

2014-03-18 Thread Ali Çehreli
On 03/18/2014 09:02 AM, Meta wrote: I'd like to have the arguments of the template parameter list of an is-expression to be visible outside that is-expression, but I can't figure out a way to get an alias to them. Is something like this possible? struct Pair(alias left, alias right) {} template

Aliasing arguments in the template parameter list of an is-expression

2014-03-18 Thread Meta
I'd like to have the arguments of the template parameter list of an is-expression to be visible outside that is-expression, but I can't figure out a way to get an alias to them. Is something like this possible? struct Pair(alias left, alias right) {} template Left(P) if (is(P == Pair!(left, r