Cannot alias expression

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Mon Oct 21 10:08:59 PDT 2013


On Monday, 21 October 2013 at 12:58:55 UTC, John Colvin wrote:
> I suspect I'm being very dumb here, but I can't get my head 
> around this:
>
>     template B(alias A)
>     {
> 	alias B = A;
>     }
>     template C(A ...)
>     {
> 	alias C = A[0];
>     }
>     static assert(B!1 == 1); //fine
>     static assert(C!1 == 1); //Error: cannot alias an 
> expression 1

I say file it as a bug. That will make for an official answer on 
what is correct. Could be that template B shouldn't be valid 
either.


More information about the Digitalmars-d-learn mailing list