memoize -- AAs don't work for ubyte[4] keys

Nick Sabalausky a at a.a
Tue Jan 4 10:24:01 PST 2011


"Manfred_Nowak" <svv1999 at hotmail.com> wrote in message 
news:Xns9E63C3202449Bsvv1999hotmailcom at 65.204.18.192...
> Andrei Alexandrescu wrote:
>
>> return result;
>
> Since when is it legal to return a local array?
>

Since D2, if it's a static array (as result is):

"Static arrays are value types. Unlike in C and D version 1, static arrays 
are passed to functions by value. Static arrays can also be returned by 
functions."
 -  http://www.digitalmars.com/d/2.0/arrays.html#static-arrays





More information about the Digitalmars-d mailing list