C++’s Standard Template Library is not an object-oriented library it is a generic library. Rather than member functions being called from object instances, functions call iterator ranges from various container types. These containers can hold various types of data. To be able to make this work, C++ makes extensive use of templates. In this next series of articles, I’m going to examine how to use templates in C++, covering both function templates and class templates, starting in this article with function templates.

#programming #programming-tips #c #c# #c++

Function Templates and the STL
1.10 GEEK