blob: ef2a5c765d9cc55d6e80e8493bb3b8d525757be7 [file] [log] [blame]
Richard Smithab91ef12012-07-08 02:38:24 +00001// RUN: %clang_cc1 -verify %s -ftemplate-depth 2
2
3template<int N> struct S { };
Richard Smith5d99a252012-09-22 00:53:56 +00004template<typename T> S<T() + T()> operator+(T, T); // expected-error {{instantiation exceeded maximum depth}} expected-note 3{{while substituting}}
Richard Smithab91ef12012-07-08 02:38:24 +00005S<0> s;
Richard Smith5d99a252012-09-22 00:53:56 +00006int k = s + s;