Re: Metaprogramming, generate argument list.

2016-08-24 Thread Jack Applegame via Digitalmars-d-learn
On Tuesday, 23 August 2016 at 21:14:01 UTC, ciechowoj wrote: This is a bit strange, as the local variables aren't known either and they seem to work. I do not want to get the address, rather an alias to `&variable` expression. D doesn't accept aliases to expressions, only symbols and literals.

Re: Metaprogramming, generate argument list.

2016-08-23 Thread ciechowoj via Digitalmars-d-learn
On Tuesday, 23 August 2016 at 07:17:16 UTC, Jack Applegame wrote: This is impossible since pointers to local variables are unknown at compile time. This is a bit strange, as the local variables aren't known either and they seem to work. I do not want to get the address, rather an alias to `&v

Re: Metaprogramming, generate argument list.

2016-08-23 Thread Jack Applegame via Digitalmars-d-learn
On Monday, 22 August 2016 at 22:01:51 UTC, ciechowoj wrote: Is it possible to generate an argument list that contains pointers to local variables at compile time? For example, consider following code: template Repeat(alias int N, alias variable) { // Magic alias Repeat = /* Even more

Re: Metaprogramming, generate argument list.

2016-08-22 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 22 August 2016 at 22:01:51 UTC, ciechowoj wrote: Is it possible to generate an argument list that contains pointers to local variables at compile time? For example, consider following code: template Repeat(alias int N, alias variable) { // Magic alias Repeat = /* Even more