escaping pointer to scope local array: bug or not?

Hosokawa Kenchi hskwk at inter7.jp
Mon Aug 17 13:58:22 PDT 2009


Jarrett Billingsley Wrote:

> On Sun, Aug 16, 2009 at 1:13 PM, HOSOKAWA Kenchi<hskwk at inter7.jp> wrote:
> > &#63728; &#63728; &#63728; &#63728;scope auto a = new int[1];
> 
> Just for future reference, "scope auto" is redundant.  "auto" does not
> mean "infer the type"; the absence of a type is enough to do that.
> "auto" is just the default storage class.  "scope a = new int[1];"
> will work fine (as will "const a = 4;" "static a = 5;" etc.).

Thanks for the nice advice.
Now I become more familiar with D!



More information about the Digitalmars-d mailing list