This is the mail archive of the gcc-bugs@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: Virtual function override differing by return type (bug?)


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

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

Regards,
Martin


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