1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
// PR c++/34336 // { dg-do compile } struct A; template <class T> struct S { T *m; T &operator* () { return *m; } }; struct B { B (const A &); }; template <class T> struct C { C (); S<A> c; }; template <class T> C<T>::C () { B *b = new B (*c); }