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?


> No, the problem you're seeing is much worse and harder for us to fix.
> That is the correct output from the compiler.  Only your understanding
> of C++ is flawed.

It seems my understanding of C++ is flawed, too. Can you elaborate why
the compiler is acting correctly for his example? I'd assume it is a
bug in the compiler to return a C* from a method that statically
returns a B*.

Martin

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