The problem is not the alias. The error message is about using
the same identifier for two different things:
C:\...\temp_0186F968.d(13,1): Error: declaration foo(T)(T t,
int i) is already defined.
I'm not sure what is giving you that particular error. Without
the alias it compiles and runs fin
On Tuesday, 11 November 2014 at 19:36:12 UTC, Lemonfiend wrote:
D is fine with alias this overloaded function:
---
void foo(int t) {}
void foo(int t, int i) {}
alias bar = foo;
---
But isn't as happy aliasing these function templates:
---
void foo(T)(T t) {}
void foo(T)(T t, int i) {}
alias ba
D is fine with alias this overloaded function:
---
void foo(int t) {}
void foo(int t, int i) {}
alias bar = foo;
---
But isn't as happy aliasing these function templates:
---
void foo(T)(T t) {}
void foo(T)(T t, int i) {}
alias bar = foo!int;
---
Is there some way/other syntax to make an alias