[Issue 17279] New: Deduce type from value parameter as well
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Mar 27 13:22:34 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17279
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 at puremagic.com
Reporter: yshuiv7 at 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.
--
More information about the Digitalmars-d-bugs
mailing list