int x = auto
Dom Disc
dominikus at scherkl.de
Thu Mar 23 08:11:09 UTC 2023
On Wednesday, 22 March 2023 at 20:58:40 UTC, Ali Çehreli wrote:
> Note: There is no closing parenthesis and a curly brace up
> there. :)
> That semicolon suggests you may have missed that the OP is
> talking about parameter lists. Or maybe not... :)
Ah, ok. thanks. I've missed that indeed.
So I think we should allow "foo(auto x = 5)" in general. The type
of default-parameters should be as unambiguous as the type of
variable declarations (with init type).
At least that wouldn't need any new syntax and is
self-explaining. Also it should be very easy to implement.
More information about the Digitalmars-d
mailing list