[Issue 9365] New: Allow partially specified template aliases
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 21 12:50:48 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9365
Summary: Allow partially specified template aliases
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: peter.alexander.au at gmail.com
--- Comment #0 from Peter Alexander <peter.alexander.au at gmail.com> 2013-01-21 12:50:45 PST ---
It would be helpful if it were possible to alias partially specified templates.
An example:
void foo(A, B)() {}
alias foo!int fooInt;
Currently this fails with "Error: template instance foo!(int) foo!(int) does
not match template declaration foo(A, B)()".
However, if you write foo as:
template foo(A)
{
void foo(B)() {}
}
Then it works.
This would be useful because it would allow you to write things like:
alias equalRoR = equal!equal;
instead of having to write:
alias equalRoR = binaryFun!((a, b) => equal!equal(a, b));
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list