Covariant returns?

Joe Buck jbuck@racerx.synopsys.com
Mon Mar 6 19:04:00 GMT 2000


> I'm wondering if covariant returns are going to be implemented anytime
> soon... I looked on the known bugs page, but I didn't see anything
> about it.

In 2.95.x they are currently implemented for cases where no adjustment to
the class pointer is required (e.g. the single inheritance case), but
not for the general case, as the message you are seeing indicates.

> struct A {
>   virtual A* Clone();
> };
> 
> struct B : public virtual A {
>   virtual B* Clone();
> };
> 
> The result:
> x.cpp:7: sorry, not implemented: adjusting pointers for covariant returns

> I'm using gcc version 2.95.2 19991024 (release).

I don't know if anyone has done work on this.



More information about the Gcc mailing list