Of course the use of templates by itself can't guarantee type safety, since a template is only as good as its author. C++ doesn't guarantee you much of anything, but it allows you to build systems that guarantee whatever you want, if you're good enough to design them properly. That's one of the main reasons why the language is so popular.
If you want guaranteed type-safe collection classes, but you don't know how to build a type-safe collection class template yourself, try the STL. In fact, even if you do know how to build them yourself, you're almost certainly better off using the STL rather than reinventing the wheel.
Of course the use of templates by itself can't guarantee type safety, since a template is only as good as its author. C++ doesn't guarantee you much of anything, but it allows you to build systems that guarantee whatever you want, if you're good enough to design them properly. That's one of the main reasons why the language is so popular.
If you want guaranteed type-safe collection classes, but you don't know how to build a type-safe collection class template yourself, try the STL. In fact, even if you do know how to build them yourself, you're almost certainly better off using the STL rather than reinventing the wheel.