// PR c++/82159 // { dg-do compile } // { dg-options " -Wno-return-type" } template struct D { T e; }; struct F : D { F(const F &); }; struct G : F { template G operator-(T); }; template struct I { typedef typename T::template J ak; }; template struct K { typename I::ak an; }; struct H { G l; }; struct C { ~C(); }; template struct M : T { template M(U, V); H h; virtual void foo() { T::bar(&h); } }; template class A; template struct B { typedef int BT; struct BC {}; template struct BD { G g; BD(BT, T n) : g(n.l - 0) {} }; B(BT, BC); }; template struct O; template struct O > > : public B >::BC {}; struct L : B > { struct P : C { void bar(H *x) { BT a; BD(a, *x); } }; template L(U x, V n) : B(x, n) {} int ll; virtual int baz() { M

(this, ll); } }; template class Q { O > > q; virtual L baz() { L(0, q); } }; template