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 () 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 ofCode:template <class T> class Cis constructed in this library as well. One method ( ex: voidCode:C<TT>) is not specialized explicitly for type TT in library "a" but specialized in another shared library "b". Just in case:Code:C::f()has some compilable definition for any type T, ex:Code:C<T>::f()in library "a".Code:template<class T> void C<T>::f(){}
Library "b" is not always linked to "a". If it's not linked the defaultis called (which does nothing).Code:C<T>::f()
If "b" is linked to "a" then explicitly specializedwhich resides in "b" is called. This is what I expect.Code:C<TT>::f()
Is it standard behavior? Is it documented somewhere? Where?
I'm using gcc under linux and the code is compiled for FreeBSD.
Thanks,
Boris



LinkBack URL
About LinkBacks


