Abstract
A function or type is said to be parameterized when one or more types used in the declaration and definition are left unspecified, so that users of the type can substitute the types of their choice. Parameterized functions are functions that have a type parameter in their argument list (or at least the return type). There are two types of parameterized types in C++/CLI: templates, which are inherited from C++, and generics, which are the CLI parameterized type. This chapter will explore generics in detail, look at some useful collection classes and container types, and then look at managed templates and compare them with generics. It will also discuss when to use generics and when to use managed templates.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Gordon Hogenson
About this chapter
Cite this chapter
(2006). Parameterized Functions and Types. In: C++/CLI. Apress. https://doi.org/10.1007/978-1-4302-0282-0_11
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0282-0_11
Publisher Name: Apress
Print ISBN: 978-1-59059-705-7
Online ISBN: 978-1-4302-0282-0
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books