|
|
On Tue, 13 May 2008 21:58:54 +0200, Warp <war### [at] tagpovrayorg> wrote:
> I can't think of any way how a certain type T can change in different
> compilation units without causing a linker error.
>
> If you have a class T, it will have a certain declared interface. That
> interface doesn't change depending on the context. If you give the
> template
> some other class, for example one derived from T, that's a *different*
> type,
> and thus requires its own instantiation of the template function.
If you change the set of functions that take objects of type T as a
parameter, the instantiation context changes for a template with T as a
type parameter, even though the signature of the template remains the same.
--
FE
Post a reply to this message
|
|