Virtual function override differing by return type (bug?)

Martin v. Loewis
Tue Jan 18 14:52:00 GMT 2000

> > The following code compiles without complaint under gcc 2.95.2
> As it should, it is valid code.

To give a more formal reply: The feature is called "covariant return
types", and it is part of Standard C++. For some users, the missing
support for it in VC++ is one of the more serious limitations in that

Not that g++ is perfect in that area; there are also cases of
covariant return types that g++ rejects.


More information about the Gcc-bugs mailing list