Instance type of a template value type parameter | Was: [Issue 408]

Bruno Medeiros brunodomedeiros+spam at com.gmail
Sun Oct 22 14:57:59 PDT 2006


d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=408
> 
> 
> ------- 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.
> 
> 

I'm not following here, would someone explain what and how is this 
situation that this behavior aims to fix ("upsetting the name mangling" 
when adding specializations) ?


-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list