primitive vector types

Christopher Wright dhasenan at gmail.com
Sat Feb 21 15:37:58 PST 2009


Jarrett Billingsley wrote:
> On Sat, Feb 21, 2009 at 5:47 PM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>> Yah, ref on the callee side, or the [] operator without any arguments on the
>> caller side.
> 
> Wait, what?  I wouldn't have expected anything but "ref type[n] foo"
> on the function parameter to pass byref.  What are you saying here?

void foo(T)(T t) {}

int[5_000_000] i;
foo(i[]); // foo!(int[]) -- semi-by-reference
foo(i); // foo!(int[5_000_000]) -- by value



More information about the Digitalmars-d mailing list