[Issue 10969] New: Variadic template parameter re-use in function signature
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 5 02:32:01 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10969
Summary: Variadic template parameter re-use in function
signature
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: john.loughran.colvin at gmail.com
--- Comment #0 from John Colvin <john.loughran.colvin at gmail.com> 2013-09-05 10:31:58 BST ---
template A(T, U...)
{
alias A = T;
}
void foo(T, U...)(A!(T, U) a){}
foo!(int, float)(3);
/d53/f246.d(9): Error: template D main.foo does not match any function template
declaration.
Candidates are: /d53/f246.d(7): f246.main.foo(T, U...)(A!(T, U) a)
/d53/f246.d(9): Error: template f246.main.foo(T, U...)(A!(T, U) a) cannot
deduce template function from argument types !(int, float)(int)
/d53/f246.d(9): Error: template instance foo!(int, float) errors instantiating
template
This also fails:
template A(T, U)
{
alias A = T;
}
void foo(T, U...)(A!(T, U[0]) a){}
foo!(int, float)(3);
/d746/f639.d(9): Error: template D main.foo does not match any function
template declaration.
Candidates are: /d746/f639.d(7): f639.main.foo(T, U...)(A!(T, U[0]) a)
/d746/f639.d(9): Error: template f639.main.foo(T, U...)(A!(T, U[0]) a) cannot
deduce template function from argument types !(int, float)(int)
/d746/f639.d(9): Error: template instance foo!(int, float) errors instantiating
template
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list