Hi All,
I need a confirmation that what I do is perfectly correct and I need to learn documents that confirm that.
I have a template class (
Code:
template <class T> class C
) which is defined in the shared library "a". Some of the methods of the class C are specialized/defined explicitly for some particular type TT in the same shared library "a" and an object of is constructed in this library as well. One method ( ex: void ) is not specialized explicitly for type TT in library "a" but specialized in another shared library "b". Just in case: has some compilable definition for any type T, ex:
Code:
template<class T> void C<T>::f(){}
in library "a".
Library "b" is not always linked to "a". If it's not linked the default is called (which does nothing).
If "b" is linked to "a" then explicitly specialized which resides in "b" is called. This is what I expect.
Is it standard behavior? Is it documented somewhere? Where?
I'm using gcc under linux and the code is compiled for FreeBSD.
Thanks,
Boris