🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1948

g++ 1.34.1 & private base classes

#1948
From: Michael Tiemann
Date: Wed, 03 May 1989 04:02
36 lines
1301 bytes
   class Object
   {
   public:
      virtual Object* some_method (const Object&);
   };
   
   
   class Collection_Member : public Object
   {};
   
   
   class Collection : public Object
   {
   public:
				    // this is what I WANT to do
      Collection_Member*  some_method (const Collection_Member&);
You can do this now (but this will be a *different* virtual function
then the one above.
   
   //
   // in desparation, I also tried:
   //
				    // g++ 1.34.1 accepts this form
No longer.
   //   Collection_Member*  some_method (const Object&);

Again, a *different* virtual function.
   //   Object*             some_method (const Collection_Member&);
   
				    // cfront only accepts this form
As does GNU C++.
   //   Object*             some_method (const Object&);
   };

Michael
Technical Details
Message-ID: <8905030402.AA01350@yahi.stanford.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!uunet!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!tiemann
References: <4611@xyzzy.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!uunet!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!tiemann
From: tiemann@YAHI.STANFORD.EDU (Michael Tiemann)
Newsgroups: gnu.g++.bug
Subject: g++ 1.34.1 & private base classes
Message-ID: <8905030402.AA01350@yahi.stanford.edu>
Date: 3 May 89 04:02:35 GMT
References: <4611@xyzzy.UUCP>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: tiemann@lurch.stanford.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36