The the 8th phase of translation was added in order to support the separate compilation model of templates that the community wished for; see N0818. However, since export
was eventually removed (in C++11), it seems to me that it's not needed anymore. Here's my logic:
- If a template specialization is referenced in a way that triggers an implicit instantiation, that implicit instantiation is performed during phase 7. As specified in [temp.pre]/10, the definition of the template must be available in the same translation unit unless there is an explicit instantiation in some other translation unit.
- If there is an explicit instantiation in some other translation unit, that explicit instantiation is performed during phase 7 and is available during phase 9 to the translated translation units that require its definition.
- Therefore, the standard no longer contemplates any scenario in which the decision of whether to instantiate a template defined in one TU depends on whether or not it is referenced by a different TU. But that was the whole point of phase 8, therefore phase 8 no longer does anything.
- A compiler can still use the freedom granted by IFNDR in [temp.pre]/10 to perform the as-required instantiation that phase 8 was designed to support. However, it doesn't make sense to have a phase 8 just to say "if you choose not to diagnose the program, here is one thing you are allowed to do", since IFNDR allows the implementation to do anything anywaay.
Did I misunderstand anything?