Abstract
The STL is written used a language feature provided by C++ called templates. Templates provide a method you can use to write generic code that can be specialized at compile time to create concrete functions and classes of varying type. The only requirement for template code is that output can be generated for all of the types used to specialize a template in your program. This may be a little difficult to understand at this point, but it should be clearer by the time you finish this chapter.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Bruce Sutherland
About this chapter
Cite this chapter
Sutherland, B. (2015). Chapter 9: Templates. In: C++ Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0157-2_9
Download citation
DOI: https://doi.org/10.1007/978-1-4842-0157-2_9
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-0158-9
Online ISBN: 978-1-4842-0157-2
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books