https://issues.dlang.org/show_bug.cgi?id=8864
Andrei Alexandrescu <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |WONTFIX --- Comment #5 from Andrei Alexandrescu <[email protected]> --- This is a core language change with many risks associated. A DIP would need to discuss them all. Workarounds are possible with library code: void main() { BigInt[] data1 = makeArray!BigInt(5, 6, 9); Ranged!(int,5,10)[] data2 = makeArray!(Ranged!(int,5,10))(5, 6, 9); Nibble[] data3 = makeArray!Nibble[1, 2, 15]; // Nibble.sizeof == 1 alias Typedef!int Mint; Mint[] data4 = makeArray!Mint(5, 6, 9); } Within the current language this is possible although not super handy: BigInt[] data1 = only(5, 6, 9).map!(x => BigInt(x)).array; --
