🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ambiguous typedef

#3129
From: TABATA Tomohira
Date: Mon, 29 Jan 1996 06:37
36 lines
1547 bytes
Hi, there.

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;
   };

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

I cannot find description on this matter in DWP.

This quetion was indicated originally by
yamada@ch0sw001.bkc.ritsumei.ac.jp.

------
   Tomohira Tabata	loba@k2.t.u-tokyo.ac.jp
   Department of Mathematical Engineering and Information Physics,
   Faculty of Engineering, University of Tokyo, Japan
   TEL: +81-3-3812-2111 ext. 6902     FAX: +81-3-5800-6969
---
[ 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: <199601290522.OAA29067@k4.k2.t.u-tokyo.ac.jp>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back

Show Full Headers
Complete Article Headers
From: TABATA Tomohira <loba@k2.t.u-tokyo.ac.jp>
Message-ID: <199601290522.OAA29067@k4.k2.t.u-tokyo.ac.jp>
X-Original-Date: Mon, 29 Jan 1996 14:22:37 +0900
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 29 Jan 96 06:37:58 GMT
Approved: fjh@cs.mu.oz.au
Organization: -
Newsgroups: comp.std.c++
Subject: ambiguous typedef
Reply-To: loba@k2.t.u-tokyo.ac.jp
X-Mailer: Mew version 1.02 on Emacs 19.28.1, Mule 2.3
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMQxrh+EDnX0m9pzZAQFnKgF7B0Yxp1e2RqFqPl6ppTdSCAEmF8kmCirO
 TCbURpLCC+c1ltdOiobcZaAc/82I2jYP
 =MuuS