POV-Ray : Newsgroups : povray.off-topic : A question about Java generics (not a flame) : Re: A question about Java generics (not a flame) Server Time
7 Sep 2024 21:17:59 EDT (-0400)
  Re: A question about Java generics (not a flame)  
From: Fredrik Eriksson
Date: 10 May 2008 15:36:48
Message: <op.uayd3lr77bxctx@e6600.bredbandsbolaget.se>
On Sat, 10 May 2008 21:14:06 +0200, Warp <war### [at] tagpovrayorg> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.