
1 Jul
2005
1 Jul
'05
10:46 a.m.
Each TU included a call to foo::bar() and only when the explicit instantiation of foo_base::bar() was present, the program worked as expected in all instantiation modes, when compiled with cxx (and g++) on Tru64.
I had a look at the generated object files and indeed there are definitions for the static variable t in each object file, but they have so called common linkage, which means that only one symbol is finally chosen.
So I think it will be ok to add the change when the instantiation is wrapped in appropriate #ifdefs. What do you think, John?
OK go ahead and add the explicit instantiations wrapped in #ifdef's, make sure there is a comment explaining the problem as well, thanks for delving into this! John.