template XYZ(alias x) { enum XYZ = x.stringof ~ "=100;"; } struct I { int i;} I i_num; int n; mixin(XYZ!(i_num.i)); //cannot find variable i mixin(XYZ!(n)); the mixins become: i=100; n=100;Now, how do I get the template's stringof to print out 'i_num.i' and not 'i'?
While working on bitfields code I've found a unique scenario
that poses some annoyances when generating the code.
- Templates and stringof... Era Scarecrow
- Re: Templates and stringof... David Nadlinger
- Re: Templates and stringof... Era Scarecrow
- Re: Templates and stringof... David Nadlinger
- Re: Templates and stringof... Andrej Mitrovic
- Re: Templates and stringof... Andrej Mitrovic
- Re: Templates and stringof... Era Scarecrow
- Re: Templates and stringof... David Nadlinger
- Re: Templates and stringof... Era Scarecrow
- Re: Templates and stringof... Philippe Sigaud
- Re: Templates and stringof... Jonathan M Davis