Return values from auto function
gbram
bpz3aurhcy at cbd5o.anonbox.net
Fri Nov 6 13:59:58 UTC 2020
On Friday, 6 November 2020 at 12:03:01 UTC, Paul Backus wrote:
> On Friday, 6 November 2020 at 10:51:20 UTC, Andrey Zherikov
> wrote:
>>
>> How can I make the original code compilable without
>> templatizing `failure` function?
>
> You can't. Both return values have to have the same type, which
> means the failure function has to be able to return more than
> one type, which means it has to be a template.
Being pedantic, he can, by templatising 'f' instead.
More information about the Digitalmars-d-learn
mailing list