Richard Smith | ab91ef1 | 2012-07-08 02:38:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -verify %s -ftemplate-depth 2 |
2 | |||||
3 | template<int N> struct S { }; | ||||
Richard Smith | 5d99a25 | 2012-09-22 00:53:56 +0000 | [diff] [blame] | 4 | template<typename T> S<T() + T()> operator+(T, T); // expected-error {{instantiation exceeded maximum depth}} expected-note 3{{while substituting}} |
Richard Smith | ab91ef1 | 2012-07-08 02:38:24 +0000 | [diff] [blame] | 5 | S<0> s; |
Richard Smith | 5d99a25 | 2012-09-22 00:53:56 +0000 | [diff] [blame] | 6 | int k = s + s; |