auto in function signature for defaulted arguments?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Thu Jun 27 06:02:53 PDT 2013
On 6/27/13, bearophile <bearophileHUGS at lycos.com> wrote:
> So is it a good idea to allow "auto" in the function signature
> for the arguments that have a default value?
>
> void foo(in auto x = VeryLongNamedStruct(1)) {}
I've wanted this too once. Although there's a tradeoff here, now the
user has to work more to figure out what type it can pass to the foo
function. On the other hand it could be useful in non-public and
generic code.
More information about the Digitalmars-d-learn
mailing list