Make int[12] convertible to int[]

Shachar Shemesh via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 17 05:13:42 PST 2014


The subject pretty much says it all.

If I have a function:
void function(int[] arr);

I'd like to be able to call it with:

int[12] a;
function(a);

I know I can do:
function(a[]);

It just seems like extra unneeded superfluous unnecessary redundancy. I 
don't see any static typing protection/errors prevented from doing this.

Shachar


More information about the Digitalmars-d mailing list