Look at your C ++ compiler header files for inspiration. The C ++ Standard Library is filled with templates, and you will usually find all the template code in the headers.
Having said that if certain templates are intended to be used with a small number of possible classes (or values) as template parameters, you have the option to explicitly create templates within the library itself, leaving only the open template ads visible in the header files.
Using the simpler pre-C ++ 11 script as an example, the C ++ library usually provides an implementation of std::basic_string only for std::basic_string<char> and std::basic_string<wchar_t> ; and leave a bunch of template code inside the library itself, with a simple template declaration std::basic_string visible in the header files.
source share