2012-07-08 10:38:24 +08:00
|
|
|
// RUN: %clang_cc1 -verify %s -ftemplate-depth 2
|
|
|
|
|
|
|
|
template<int N> struct S { };
|
2014-01-11 10:37:12 +08:00
|
|
|
template<typename T> S<T() + T()> operator+(T, T); // expected-error {{instantiation exceeded maximum depth}} expected-note 2{{while substituting}}
|
2012-07-08 10:38:24 +08:00
|
|
|
S<0> s;
|
2014-01-11 10:37:12 +08:00
|
|
|
int k = s + s; // expected-note {{while substituting}}
|