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 19:15:14 EDT (-0400)
  Re: A question about Java generics (not a flame)  
From: Fredrik Eriksson
Date: 17 May 2008 07:56:24
Message: <op.ubarf9o57bxctx@e6600.bredbandsbolaget.se>
On Sat, 17 May 2008 13:41:18 +0200, Warp <war### [at] tagpovrayorg> wrote:
> Fredrik Eriksson <fe79}--at--{yahoo}--dot--{com> wrote:
>> Your foo-bar example is ill-formed. The compiler can do whatever it  
>> wants.
>
>   How is it different from your example, which you gave earlier? Also you
> had a template function calling another template function, and the latter
> being specialized in the context of instantiating the former. That's  
> exactly what I did.


The difference is that you are instantiating 'foo<int>' in more than one  
place. When you do that, the instantiations must have the same meaning or  
the program is ill-formed. In my example 'f<int>' is only instantiated  
once. That example was intented only to demonstrate why an exported  
template must be recompiled when code that uses it is changed.



-- 
FE


Post a reply to this message

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