On Sun, 10 Jun 2012 20:08:53 -0400, Mehrdad <wfunct...@hotmail.com> wrote:

Type deduction.

Exactly. And if they need to be assigned to a static array, then the compiler can automatically do what it needs to do to avoid the extra heap allocation.

- Jonathan M Davis


"Type deduction"?  o.O
I don't understand... could someone give me an example of what would break if we used the rule I suggested?

Anything that uses type deduction? Most of the time, you do *not* want a static array, especially for template functions that use IFTI.

Note that D1 was like this, [1,2,3] was auto-typed to int[3u]. It was a constant source of pain that I would not like to revisit. Especially since static arrays are now passed by value.

-Steve

Reply via email to