Bug 17279 – Deduce type from value parameter as well

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-03-27T20:22:34Z
Last change time
2018-11-30T12:57:20Z
Assigned to
No Owner
Creator
Yuxuan Shui

Comments

Comment #0 by yshuiv7 — 2017-03-27T20:22:34Z
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.
Comment #1 by nick — 2018-11-30T12:57:20Z
*** This issue has been marked as a duplicate of issue 14359 ***