Comment #0 by andrej.mitrovich — 2013-01-25T16:14:49Z
Quote:
---------
int[3] abc;
---------
$(P Passing abc to functions results in these implicit conversions:)
---------
void func(int[3] array); // actually <reference to><array[3] of><int>
void func(int* p); // abc is converted to a pointer
// to the first element
void func(int[] array); // abc is converted to a dynamic array
---------
w.r.t. comments:
For the first func: This is only true in D1.
For the second func: I didn't even know worked in D2. But I don't see the benefit of such a conversion (perhaps interfacing with C?).
For he third func: I thought we always had to use a slice, but it seems to work without it. How come?
Comment #1 by github-bugzilla — 2013-02-06T20:04:52Z