[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:16:22 PST 2014
https://issues.dlang.org/show_bug.cgi?id=8008
--- Comment #10 from bearophile_hugs at eml.cc ---
(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;
}
--
More information about the Digitalmars-d-bugs
mailing list