initializedArray

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Dec 21 03:13:52 PST 2011


Ok just realized I can't use a mixin, lengths are dynamic, heheh. That
went over my head. I'll see what else I can do..

On 12/21/11, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> On 12/21/11, Philippe Sigaud <philippe.sigaud at gmail.com> wrote:
>> size_t[] arrayLengths(A)(A a) if (isStaticArray!A)
>> {
>>     static if (isStaticArray!(ElementType!A))
>> 	return arrayLengths(a[0]) ~  a.length;
>>     else
>>         return [a.length];
>> }
>
> That returns an array, but I can't pass an array in place of a
> variadic argument.
>
> The prototype of uninitializedArray is:
> auto uninitializedArray(T, I...)(I sizes)
> if(allSatisfy!(isIntegral, I)) { }
>


More information about the Digitalmars-d mailing list