Open
Description
Example: https://godbolt.org/z/5eKPfxK85
template<class T, template<class> class TT> struct A;
template<class T, template<class> class TT = A> struct A {};
A<int> a;
This exhausts the stack before we hit the instantiation depth implementation limit:
<source>:2:46: warning: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely [-Wstack-exhausted]
2 | template<class T, template<class> class TT = A> struct A {};
| ^
Program terminated with signal: SIGSEGV
Compiler returned: 139