Parameterized Types for C++
暂无分享,去创建一个
Type parameterization is the ability to defrne a type in terms of another, unspecifled, type. Versions of the parameterized type may then be created for several particular parameter types. A language supporting type parameterization allows specification ofgeneral container types such as list, vector, and associative array where the specific type of the elements is left as a parameter. Thus, a parameterized class specifies an unbounded set of related types; for example: list of int, list of name, list of shape, etc. Type parameterization is one way of making a language more extensible. In the context of C++, the problems are