alias overloaded function template
Lemonfiend via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Nov 11 11:36:11 PST 2014
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 like this work?
Or specify in the alias which function template to use (ie. alias
bar = foo!int(int)).
More information about the Digitalmars-d-learn
mailing list