On Tuesday, 13 November 2012 at 21:34:28 UTC, Rob T wrote:
I'm wondering why overloading has been implemented to only match on the argument list rather than the full signature which includes the return type? I know I would use it if it was available.

If it worked on return type, how would it decide the overload?

int foo() { ... }
string foo() { ... }

void bar(int x) { ... }
void bar(string y) { ... }

auto z = foo(); // what foo?
bar(foo()); // what foo?

Reply via email to