http://d.puremagic.com/issues/show_bug.cgi?id=9394
Summary: ABI for static arrays is outdated
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: websites
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-01-25
16:14:49 PST ---
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?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------