Bug 4311 – Applying a template to a variadic template parameter in a templated function's parameter list breaks compilation

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-06-14T06:39:00Z
Last change time
2012-05-13T12:27:11Z
Assigned to
nobody
Creator
simen.kjaras

Comments

Comment #0 by simen.kjaras — 2010-06-14T06:39:51Z
Test case: template foo( T... ) { alias T[0] foo; // Does not matter what is in here } auto bar( T... )( foo!T arg ) { } bar!( int, float )( 2 ); Error: template bar(T...) does not match any function template declaration Error: template bar(T...) cannot deduce template function from argument types !(1,2)() Error: template instance errors instantiating template
Comment #1 by simen.kjaras — 2010-06-14T06:42:13Z
Also, this works: alias bar!( int, float ) baz; baz( 2, 3 );
Comment #2 by simen.kjaras — 2010-10-26T15:26:36Z
(In reply to comment #1) > Also, this works: > > alias bar!( int, float ) baz; > baz( 2, 3 ); Apparently, this either no longer works, or I was a bit drunk when I wrote it. remove the 3, and things work: alias bar!( int, float ) baz; baz( 2 );
Comment #3 by braddr — 2011-02-06T15:39:49Z
Mass migration of bugs marked as x86-64 to just x86. The platform run on isn't what's relevant, it's if the app is a 32 or 64 bit app.
Comment #4 by lovelydear — 2012-04-21T15:03:40Z
Compiles on 2.059.
Comment #5 by simen.kjaras — 2012-05-13T12:27:11Z
Indeed.