www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13765] New: not explicit template type name support


          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

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

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}
method scalar 2
for:auto fun(T...)(T a)
fun(1)(2,3)...(/*here really invoked*/)

Nov 22 2014