public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/8205: using declaration doesn't work while mulitiple inheritance was used.
@ 2002-10-11 20:56 hou_zhenyu
  0 siblings, 0 replies; only message in thread
From: hou_zhenyu @ 2002-10-11 20:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: chicares


>Number:         8205
>Category:       c++
>Synopsis:       using declaration doesn't work while mulitiple inheritance was used.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 11 20:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     hou_zhenyu@hotmail.com
>Release:        gcc3.2
>Organization:
>Environment:
mingw2.0 release
>Description:
when multiple non-public base classes are used, using declarations for changing acccessibility of the base classes members have no effect. When access such members in client code, the compiler reports: 
'Base' is an inaccessible base of 'Heir'
>How-To-Repeat:
class A { public: int i; };

class B {};

class D : A    { public: using A::i; };
class E : A, B { public: using A::i; };

int main()
{
  D d;
  d.i;
  E e;
  e.i; // "`A' is an inaccessible base of `E'"
}
>Fix:
None. Change private inheritance to public inheritance can work, but it breaks the semantic.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-12  3:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-11 20:56 c++/8205: using declaration doesn't work while mulitiple inheritance was used hou_zhenyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).