|
![](/i/fill.gif) |
On Sat, 10 May 2008 21:14:06 +0200, Warp <war### [at] tag povray org> wrote:
> Fredrik Eriksson <fe79}--at--{yahoo}--dot--{com> wrote:
>> Some linkers can recognise that the generated code is identical, and
>> merge all the copies.
>
> Not "some". All of them. They have to.
>
> That's because, AFAIK, as per the C++ standard, you have to be able to,
> for example, create a function pointer to a given template function, and
> if two pointers initialized in different compilation units point to the
> same function, they have to compare equal. Another requisite is that if
> there are static variables inside the function, they must all use the
> same static variable.
This is true for multiple definitions of the same object, but Darren was
talking about instantiations on multiple distinct types.
--
FE
Post a reply to this message
|
![](/i/fill.gif) |