8 lines · cpp
1// RUN: %clang_cc1 -verify %s -ftemplate-depth=22 3template<int N> struct S { };4template<typename T> S<T() + T()> operator+(T, T); // expected-error {{instantiation exceeded maximum depth}} expected-note 2{{while substituting}}5// expected-note@-1 {{use -ftemplate-depth=N to increase recursive template instantiation depth}}6S<0> s;7int k = s + s; // expected-note {{while substituting}}8