[Issue 8008] Syntax for fixed size array literals like [1,2,3]s

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Dec 27 11:19:13 PST 2014


https://issues.dlang.org/show_bug.cgi?id=8008

--- Comment #11 from rswhite4 at gmail.com ---
(In reply to bearophile_hugs from comment #10)
> (In reply to rswhite4 from comment #9)
> 
> > auto ref U[N] s(U, alias N)(auto ref U[N] arr) pure nothrow @safe @property
> > @nogc 
> > 	if (__traits(compiles, { size_t i = N; }))
> 
> Simpler:
> 
> auto ref U[N] s(U, size_t N)(auto ref U[N] arr)
> pure nothrow @safe @property @nogc {
>     return arr;
> }

Of Course! Sometimes I think way too complicated.

--


More information about the Digitalmars-d-bugs mailing list