// { dg-do compile { target c++11 } } template struct TypeA { typedef int type; }; template struct TypeB { template typename TypeA::type fn(); }; struct TypeC { TypeB<10> b; // This was being printed as: // template // decltype (((TypeC*)this)-> // TypeC::b. // template typename TypeA::type TypeB::fn [with int U = U, int N = 10, typename TypeA::type = TypeA::type]()) // TypeC::fn() // we don't want to see the template header, return type, or parameter bindings // for TypeB::fn. template auto fn() -> decltype(b.fn()); // { dg-bogus "typename|with" } }; int main() { TypeC().fn<4>(1); // { dg-error "no match" } }