* Win32 issues with Templates and Libs *

Sean Kelly sean at f4.ca
Wed Feb 21 07:26:11 PST 2007


Walter Bright wrote:
> James Dennett wrote:
>> Walter Bright wrote:
>>> Pragma wrote:
>>>> That raises an interesting question: seeing as how it's using the same
>>>> backend, how does DMC handle this problem for C++?
>>> Unlike D, a C++ compiler has no idea what templates are instantiated in
>>> other files. So it instantiates everything. This is one reason why C++
>>> builds are so much slower than D.
>>
>> It's fairly common for C++ compilers to use some kind
>> of storage to record which templates are instantiated
>> from which files, and has been for quite a few years.
> 
> Yeah, I've considered building such a thing. But it would be complex, 
> and the programmer would have to accommodate its idiosyncracies. Better 
> off fixing the language to support proper modules.

For what it's worth, module support has been removed from the list of 
features slated for C++ 0x.  They ran out of time.


Sean



More information about the Digitalmars-d mailing list