[Issue 1641] Template function arg deduction gets confused when used with implicit conversions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 11 08:53:28 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1641
smjg at iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
Keywords| |rejects-valid
Summary|Template function arg |Template function arg
|deduction gets confused when|deduction gets confused when
|used with the inner name |used with implicit
|trick |conversions
------- Comment #2 from smjg at iname.com 2007-11-11 10:53 -------
No nested template is required - this is sufficient to show the problem (DMD
1.023 and 2.007, Windows):
----------
void foo(U)(U a, uint b, uint c) {
}
void main() {
int x;
foo(x, 0, 1);
}
----------
bz1641a.d(6): template bz1641a.foo(U) does not match any template declaration
bz1641a.d(6): template bz1641a.foo(U) cannot deduce template function from
argument types (int,int,int)
----------
So the problem is that, when trying to perform IFTI, it doesn't look for
implicit conversions.
--
More information about the Digitalmars-d-bugs
mailing list