🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2057

Re: virtual overload differing in return type only?

#2057
From: Jim Garrison
Date: Wed, 27 Sep 1995 18:22
30 lines
1375 bytes
In <MATT.95Sep24001959@Austern>, clamage@Eng.Sun.COM (Steve Clamage) writes:
>
>jhg@mpd.tandem.com (Jim Garrison) writes:
>

[snip]

>
>The draft standard allows "covariant return types".
>
>If the base-class version of a virtual function returns a
>pointer (or reference) to a class, the derived-class version may
>return a pointer (or reference) to a class derived from the
>original.
>

Thanks for the reply.  The example I gave was incorrect, and what 
I WAS looking for was 'covariant return types'.  This change (not 
yet implemented in SGI's compiler) allows me to do exactly what I 
want.

Jim Garrison
jhg@acm.org


---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <MATT.95Sep27112205@physics10.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
References: <43s5k2$nk6@gorby.mpd.tandem.com> <MATT.95Sep24001959@Austern>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
From: jhg@mpd.tandem.com (Jim Garrison)
Newsgroups: comp.std.c++
Subject: Re: virtual overload differing in return type only?
Date: 27 Sep 1995 18:22:05 GMT
Organization: Tandem Computers,Inc. (Austin, TX)
Approved: matt@physics10.Berkeley.EDU (Matt Austern)
Message-ID: <MATT.95Sep27112205@physics10.Berkeley.EDU>
References: <43s5k2$nk6@gorby.mpd.tandem.com> <MATT.95Sep24001959@Austern>
Reply-To: jhg@mpd.tandem.com
NNTP-Posting-Host: physics10.berkeley.edu