Send empty assoc array to function

JN 666total at wp.pl
Thu Jul 9 19:53:42 UTC 2020


void foo(int[int] bar)
{
     // ...
}



Is it possible to send an empty array literal?

foo( [ 0 : 2 ] ) works
foo( [] ) doesn't

int[int] empty;
foo(empty);
works but it's two lines


More information about the Digitalmars-d-learn mailing list