Bug 7748 – Unification of template arguments with parameters does not work with variadics
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-21T11:59:00Z
Last change time
2013-11-26T20:27:28Z
Assigned to
nobody
Creator
andrei
Comments
Comment #0 by andrei — 2012-03-21T11:59:23Z
Consider:
struct S(T...) {
}
void fun(T1, T2...)(S!(T1) a, S!(T2) b) {
}
void main() {
S!(string) s1;
S!(int, bool) s2;
fun(s1, s2);
}
The example fails to compile, but it works and should associate the two parameters accordingly. (It does work without variadics.)