int[] as constructor

Stanislav Blinov stanislav.blinov at gmail.com
Wed Dec 5 10:34:44 UTC 2018


On Tuesday, 4 December 2018 at 23:28:42 UTC, H. S. Teoh wrote:

> Well OK, for int[] it's kinda silly 'cos that's the default, 
> but in my code I've often had to write things like:
>
> 	auto z = cast(float[]) [ 1.0, 2.0, 3.0 ];

Err,

auto z = [ 1.0f, 2, 3 ];

?


More information about the Digitalmars-d-learn mailing list