•It
is possible to define our function templates in a separate implementation file and simply declare that those functions exist in the software that uses them.
To do so requires
that we define or declare our function
templates with the export keyword.
•When
export is not used, the template function must be defined in every file that implicitly or
explicitly instantiates
that template function.
•Functions
exported and declared to be inline are just taken to be inline and are not exported.
n //t_func.h declarations of the function
template(s)
n template<class TYPE_ID1, class
TYPE_ID2>
n void t_funct(TYPE_ID1, TYPE_ID2);
n //t_func.cpp implementation of the function
template(s)
n export template<class TYPE_ID1, class
TYPE_ID2>
n void t_funct(TYPE_ID1 arg_1, TYPE_ID2 arg_2)
{...}
n