Hair-pulling, D, and Optlink

Walter Bright newshound at
Fri Apr 21 12:32:04 PDT 2006

Lars Ivar Igesund wrote:
> kris wrote:
>> This problem is not limited to OMF files -- it shows up on linux too,
>> where ELF format is used.
>> Sean asked why this issue does not crop up with DMC, or other C++
>> compilers supporting templates? I'd like to understand that too. Would
>> be nice if this (serious) difficulty were to get some lovin'
>> - Kris
> Note that this has been reported before:
> Walter promised to check out it, but I haven't noticed any replies. Sitting
> around #D, I've gotten the impression that Mr Chancellor and others
> consider D's templates to be thouroughly broken due to these issues.

It "works" in C++ because the compiler regenerates the template 
instantiation in *every* object file where it is used. The C++ compiler 
doesn't know about other object files.

In D, when multiple sources are given on the command line, the compiler 
doesn't generate redundant template instantiations.

More information about the Digitalmars-d-bugs mailing list