 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
A
class template will be implicitly instantiated when it is
|
|
|
referenced
in a context that requires a completely defined
|
|
type.
|
|
class_name <int> object causes an
implicit instantiation.
|
|
| • |
Because
objects are not formed when we say class_name
|
|
|
<int>
* ptr; therefore, the class does not need to be
|
|
|
defined
and an integer instantiation of this class is not
|
|
|
generated.
|
|
| • |
However,
when the pointer is used in a way that requires
|
|
|
the
pointer type to be defined (such as saying *ptr), then
|
|
|
an
instantiation will be generated at that time.
|
|