int x = auto
Max Samukha
maxsamukha at gmail.com
Wed Mar 22 13:41:44 UTC 2023
On Wednesday, 22 March 2023 at 12:49:23 UTC, Nick Treleaven wrote:
> If the enum type inference DIP was accepted and extended to all
> types, you could write:
>
> int x = $init;
That wouldn't work for default values that are not members of the
parameter type - `auto x = 0, auto x =
someUnfortunateStructFactory!()()`, etc. Default values are
initializers. Type inference should just work for them.
More information about the Digitalmars-d
mailing list