For a function template specialization, a member function template
specialization, or a specialization for a member function or static data member
of a class template,
if the specialization is implicitly instantiated because it is referenced
from within another template specialization and
the context from which it is referenced depends on a template parameter,
the point of instantiation of the specialization is the point of instantiation
of the enclosing specialization
. Otherwise, the point of instantiation for such a specialization immediately
follows the namespace scope declaration
or definition that refers to the specialization
.For a
noexcept-specifier of a function template
specialization or specialization of a member function of a class template, if
the
noexcept-specifier is implicitly instantiated because
it is needed by another template specialization and the context that requires
it depends on a template parameter, the point of instantiation of the
noexcept-specifier is the point of instantiation of the
specialization that requires it
. For a class template specialization, a class member template specialization,
or a specialization for a class member of a class template,
if the specialization is implicitly instantiated because it is referenced
from within another template specialization,
if the context from which the specialization is referenced depends on a
template parameter,
and if the specialization is not instantiated previous to the instantiation of
the enclosing template,
the point of instantiation is immediately before the point of instantiation of
the enclosing template
. Otherwise, the point of instantiation for such a specialization immediately
precedes the namespace scope declaration
or definition that refers to the specialization
.A specialization for a function template, a member function template,
or of a member function or static data member of a class template may have
multiple points of instantiations within a translation unit, and in addition
to the points of instantiation described above, for any such specialization
that has a point of instantiation within the translation unit, the end of the
translation unit is also considered a point of instantiation
. A specialization for a class template has at most one point of instantiation
within a translation unit
. A specialization for any template may have points of instantiation in multiple
translation units
. If two different points of instantiation give a template specialization
different meanings according to the
one-definition rule,
the program is ill-formed, no diagnostic required
.