🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ambiguous typedef

#3161
From: Fergus Henderson
Date: Mon, 29 Jan 1996 16:05
33 lines
1389 bytes
TABATA Tomohira <loba@k2.t.u-tokyo.ac.jp> writes:

>Can't I use this declaration successfully?

>   class T1 {
>   public:
>      typedef T1 myclass;
>   };

>   class T2 {
>   public:
>      typedef T2 myclass;
>   };

>   class T3 : public T1, T2 {
>   public:
>      typedef T3 myclass;
>   };

That code is strictly conforming (i.e. perfectly legal).

>By gcc-2.7.1 this cannot be compiled because of "request for member
>`myclass' is ambiguous" on the line "typedef T3 myclass;".

This is a bug in gcc.

--
Fergus Henderson             	WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au              	PGP: finger fjh@128.250.37.3

[ 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: <9602921.25314@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
References: <199601290522.OAA29067@k4.k2.t.u-tokyo.ac.jp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Newsgroups: comp.std.c++
Subject: Re: ambiguous typedef
Date: 29 Jan 1996 16:05:55 GMT
Organization: Computer Science, University of Melbourne, Australia
Sender: news@cs.mu.OZ.AU (CS-Usenet)
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <9602921.25314@mulga.cs.mu.OZ.AU>
References: <199601290522.OAA29067@k4.k2.t.u-tokyo.ac.jp>
NNTP-Posting-Host: 129.146.88.126
Originator: clamage@taumet