On 09/10/2010 10:17 AM, Jonathan M Davis wrote:
On Friday 10 September 2010 00:50:32 bearophile wrote:
Jonathan M Davis:
Aren't they _always_ on the heap?

void main() {
     int[10] a;
     int[] b = a[];
}

Bye,
bearophile

Ah, good point. When you have a slice of a static array as opposed to a dynamic
arra allocated with new, then it's on the stack. Since I pretty much never use
static arrays, I forgot about that.

- Jonathan M Davis

int i;
int[] heh = (&i)[0..1];

Reply via email to