共用方式為


Generics (C++) 

Visual C++ 2005 introduces support for generic methods and types in C++. In this section, find out how to author your own generic methods and types in C++ and how to use generic types authored in C# or another language in C++. This section also includes a comparison of generics and C++ templates.

In This Section

  • Overview of Generics in C++
    Information about generics are, the motivation for the language feature, definitions of terms used to describe generics, and information about the use of reference types and value types as type parameters for generics.
  • Generic Functions
    Information about defining and using generic functions and methods.
  • Constraints
    Information about using constraints in generic types.
  • Generics and Templates
    A comparison of generics and templates, when to use each, and how to combine them usefully.

See Also

Concepts

New C++ Language Features