(Why bother? Well, you need to know these when you debug STL or extend STL.)
– Containers — are class templates. 100%
– Algorithms — are function templates. 100%
– iterators? A beginner can safely assume that Most of the time iterators are defined inside each container template as a Member type. Since a container has a dummy type T, the iterator must be a class template of T (or a typedef thereof), a Nested class template of T, presumably, inferred from the syntax :
– The container/algo/iterator adapters are typically class templates
– functor are typically class templates
A trivial consequence — the declarations of containers and iterators are complicated by the templates.
Algorithm declarations are simpler in comparison.