|
 |
On Thu, 15 May 2008 14:49:55 +0200, Warp <war### [at] tag povray org> wrote:
> Fredrik Eriksson <fe79}--at--{yahoo}--dot--{com> wrote:
>> Now make a small change to main.cpp:
>
>> // main.cpp
>> export template <typename T> void f();
>
>> #include "g.hpp"
>> template <> void g(int i) { /* Do something completely different */ }
>
>> int main(){ f<int>(); }
>> // end main.cpp
>
> I don't see how this causes a problem described earlier. This simply
> requires main.cpp to be recompiled (after all, it's the one which has
> been changed), which will result in a new object file which does not
> use the export template.
What? The exported template 'f' is still used. Only 'g' is changed.
> Why would this cause the need to recompile the export template for
> each usage in the program?
It forces the exported template to be recompiled whenever you change any
translation unit that instantiates it.
--
FE
Post a reply to this message
|
 |