November 22, 2014 [Issue 13765] New: not explicit template type name support | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: galaxylang@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*/) -- |
Copyright © 1999-2021 by the D Language Foundation