[Issue 13765] New: not explicit template type name support
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Nov 22 08:29:59 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13765
Issue ID: 13765
Summary: not explicit template type name support
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: galaxylang at gmail.com
1:
i think template
auto fun(T1,T2)(T1 x,T2 y){return x+y;}
can rewrite to
auto fun(x, y){return x+y;}
especial in a local scope ,for the type x,y 's type are assured
2:
method scalar 1
first,method with only one parameter rewrite
for: auto fun(int a)
fun(1) ======== fun 1
second,more then one
for: auto fun(int a,int b,int c)
fun(1,2,3) ======= fun(1)/*[got auto(int,int)]*/(2,3)==========fun 1 (2,3)
======== fun 1 2 3
fun(auto delegate(T) dg) will call as fun {exprs}
3:
method scalar 2
for:auto fun(T...)(T a)
fun(1)(2,3)...(/*here really invoked*/)
--
More information about the Digitalmars-d-bugs
mailing list