[3.3] Fix for 10428 breaks template instantiation
Mark Mitchell
mark@codesourcery.com
Mon May 5 19:23:00 GMT 2003
On Mon, 2003-05-05 at 11:51, Michael Matz wrote:
> Hi Mark,
>
> I noticed that the current 3.3 branch does not compile the below code
> anymore:
>
> -------- snip -------
> template<typename T>
> struct A {
> ~A() {p->unref();};
> T* p;
> };
>
> struct B;
>
> struct C {
> C() {}
> A<B> b;
> };
>
> struct B{
> void unref(void);
> };
> void B::unref(void) {}
>
> C c;
> -------- snap -------
That code is broken; this is a progression. As you say, B is not
complete when C::C() is defined.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
More information about the Gcc
mailing list