ILE C/C++ Programmer's Guide
For other functions and for static data members that have external linkage,
defining them in more than one compilation unit would normally cause an error
when the program is bound. ILE C++ avoids this problem by giving
special treatment to template-generated versions of these objects. At
bind time, ILE C++ gathers all template-generated functions and static-member
definitions, plus any explicit specializations, and resolves all references to
them:
- If an explicit specialization of the function or static member exists, it
is used for all references. All template-generated definitions of that
function or static member are discarded.
- If no explicit specialization exists, one of the template-generated
definitions is used for all references. Any other template-generated
definitions of that function or static member are discarded.
- Note:
- Multiple template-generated definitions of functions or static members result
in larger modules and longer compile times. The duplicated code for the
templates is eliminated during binding, so that executable programs are not
larger.
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.