[Issue 408] Template instance matching doesn't work sometimes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 8 12:15:10 PDT 2006
http://d.puremagic.com/issues/show_bug.cgi?id=408
burton-radons at smocky.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burton-radons at smocky.com
------- Comment #1 from burton-radons at smocky.com 2006-10-08 14:15 -------
Found it. If a template instantiation literal value is given the type "uint", D
casts it to "int" implicitly so it no longer works against a second
instantiation. So this works:
struct O (int T)
{
.O! (T) f () { return *this; }
}
alias O! (2) o;
But this fails:
struct O (uint T)
{
.O! (T) f () { return *this; }
}
alias O! (2) o;
--
More information about the Digitalmars-d-bugs
mailing list