[Issue 408] Template instance matching doesn't work sometimes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 16 02:20:46 PDT 2006


bugzilla at digitalmars.com changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

------- Comment #2 from bugzilla at digitalmars.com  2006-10-16 04:20 -------
This is working as designed (although the error message isn't great). The issue
is, is the template instance made from the argument before the cast to the
template value type, or after? D's design is to do make it from the original
type. In the third example, 2 is an int, but T is a uint, hence the two
instances are not the same.

The reason for this is so that template specializations can be added without
upsetting the name mangling.


More information about the Digitalmars-d-bugs mailing list