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