Alias type with different initialiser.

Bastiaan Veelo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 14 02:49:19 PST 2017


On Tuesday, 14 February 2017 at 01:31:10 UTC, John Colvin wrote:
> On Monday, 13 February 2017 at 22:59:11 UTC, John Colvin wrote:
>> [ snip ]
>
> sorry, made a typo, that should have been
>
>>     alias int1 = Initial!(int, 1);
>>     static assert(int1.initial == 1); // typeof(int1.initial) 
>> == int
>>     static assert(int1.init == 1); // typeof(int1.init) == int1

What is the difference between

   alias Initial!(int, 1) int1;

and

   alias int1 = Initial!(int, 1);

? Or was the typo in the comments alone?

Thanks.


More information about the Digitalmars-d-learn mailing list