Annex F (informative) Core undefined behavior [ub]

F.7 [temp]: Templates [ub.temp]

F.7.1[ub:temp.inst.inf.recursion]
Specified in: [temp.inst]

The result of an infinite recursion in template instantiation is undefined.
[Example 1: template <class T> class X { X<T> *p; // OK X<T *> a; // implicit instantiation of X<T> requires // the implicit instantiation of X<T*> which requires // the implicit instantiation of X<T**> which … }; int main() { X<int> x; // undefined behavior, instantiation will lead to infinite recursion } — end example]