1 // PR c++/47336 2 // { dg-do compile { target c++11 } } 3 4 template <typename T> g(T t)5void g(T t) 6 { 7 t+1; // { dg-error "no match" } 8 } 9 10 template <typename S> 11 class C 12 { 13 struct D {} d; 14 public: decltype(g (d))15 decltype(g(d)) h() 16 { 17 return g(d); 18 } 19 }; 20 main()21int main() 22 { 23 C<int>().h(); 24 } 25