This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Covariant returns?



> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]