Local templates and alias parameters

Ali Çehreli acehreli at yahoo.com
Fri Jun 28 16:57:29 PDT 2013


On 06/28/2013 01:04 PM, John Colvin wrote:
> void main()
> {
>      template A(alias a)
>      {
>          enum A = a.stringof;
>      }
>      int b;
>      string s = A!b;   // Error: template instance A!(b) cannot use
> local 'b' as parameter to non-global template A(alias a)
> }
>
> Bug or feature?

Popular limitation: :)

   http://d.puremagic.com/issues/show_bug.cgi?id=5710

Ali



More information about the Digitalmars-d-learn mailing list