The type inference everywhere

Salih Dincer salihdb at
Sun Oct 31 14:07:34 UTC 2021

auto foo(int value, auto s = Section(2, 60)) {
    int max;      /*   ^------- ?
    ...            */
    return Section (0, max)
Is possible something like above pointed. OK, I know it isn't 
because I tried! Well, wouldn't it be nice if it did?

Why shouldn't the inference be possible on default argument? Peek 
out of rvalue...


More information about the Digitalmars-d-learn mailing list