Mixin template parameter that is an undefined variable

2015-10-23 Thread tcak via Digitalmars-d-learn
[code] mixin template Test(alias a){ int a; } void main(){ mixin Test!blah; } [/code] Compiler says it doesn't know about "blah". My purpose is to define the parameter as a variable. Is that possible?

Re: Mixin template parameter that is an undefined variable

2015-10-23 Thread John Colvin via Digitalmars-d-learn
On Friday, 23 October 2015 at 12:22:49 UTC, tcak wrote: [code] mixin template Test(alias a){ int a; } void main(){ mixin Test!blah; } [/code] Compiler says it doesn't know about "blah". My purpose is to define the parameter as a variable. Is that possible? you would have to us