I've used function and class templates in implementation of my libraries. So far I've just instantiated a template in the library unit-tests (CppUnit), and then proceeded to test it almost like any other normal class or function.
Recently I've been planning to add some templates also to the library APIs. Good interface is of course the most important thing, template or not. With well designed and implemented templates you can, if not totally prevent, at least make it more difficult for the user to shoot himself in the foot. Any way I feel that unit-testing public templates need to be a bit more rigorous, compared to purely internal templates.
So, how have you unit-tested your C++ templates? Have you come up with any elegant solutions, especially for templates in public library APIs?