www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17279] New: Deduce type from value parameter as well


          Issue ID: 17279
           Summary: Deduce type from value parameter as well
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: yshuiv7 gmail.com

Current dmd doesn't deduce type from value parameter, i.e. this won't work:

    template A(Char[] str, Char)

Have to write it like this:

    template A(Char, Char[] str)

Thus user have to specify what 'Char' is.

Workaround exists, e.g. make str an alias parameter. But I think it would be
nice if the first one is supported.

Mar 27 2017