Thinking in C++ Vol 2 - Practical Programming |
Prev |
Home |
Next |
When the compiler encounters an identifier it must determine
the type and scope (and in the case of variables, the lifetime) of the entity
the identifier represents. Templates add complexity to the situation. Because the
compiler doesn t know everything about a template when it first sees the
definition, it can t tell whether the template is being used properly until it
sees the template instantiation. This predicament leads to a two-phase process
for template compilation.
Thinking in C++ Vol 2 - Practical Programming |
Prev |
Home |
Next |