On Thursday, 17 May 2012 at 11:49:18 UTC, Roman D. Boiko wrote:
Is there anything preventing us from adding constraints on the auto function return value? I mean, such language extension seems to be quite useful.

For example, it would be no longer necessary to provide method bodies for functions with auto return values.

In many cases this would eliminate the need for introducing an interface.

interface returnsDuckTyped
{
    auto foo() if(isInputRange!auto);
}

(fixed typo)

Reply via email to