typeof([2,2]) !=? int[2]

Zhenya zheny at list.ru
Fri Mar 8 15:25:18 PST 2013


On Friday, 8 March 2013 at 23:18:52 UTC, cal wrote:
> On Friday, 8 March 2013 at 23:15:30 UTC, Zhenya wrote:
>> Yes,it's a typo.But it seems to be ugly pass dynamically 
>> allocated array through
>> a template parameter,because it's size should be compile-time 
>> constant.
>
> Its size is a compile-time constant because it is an array 
> literal. The size is known inside the constraint.
Yes,really.
I thought that dynamic allocation is runtime operation


More information about the Digitalmars-d-learn mailing list