Previous: Using the C++ standard library, Up: Compiling a C++ program [Contents][Index]
Templates provide the ability to define C++ classes which support
generic programming techniques. Templates can be considered as a
powerful kind of macro facility. When a templated class or function is
used with a specific class or type, such as float
or int
,
the corresponding template code is compiled with that type substituted
in the appropriate places.
• Using C++ standard library templates: | ||
• Providing your own templates: | ||
• Explicit template instantiation: | ||
• The export keyword: |