From mboxrd@z Thu Jan 1 00:00:00 1970 From: lerdsuwa@gcc.gnu.org To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c++/2469 Date: Tue, 03 Apr 2001 05:26:00 -0000 Message-id: <20010403122600.2601.qmail@sourceware.cygnus.com> X-SW-Source: 2001-04/msg00045.html List-Id: The following reply was made to PR c++/2469; it has been noted by GNATS. From: lerdsuwa@gcc.gnu.org To: Thomas.Foerch@alcatel.de, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, tfoerch@online.de Cc: Subject: Re: c++/2469 Date: 3 Apr 2001 12:23:59 -0000 Synopsis: ambiguity check fails for static member via multiple inheritance/templates State-Changed-From-To: open->closed State-Changed-By: lerdsuwa State-Changed-When: Tue Apr 3 08:23:59 2001 State-Changed-Why: Not a bug. The 's' inside 'C' is hidden since the base class 'C' depends on the template parameter 'T'. Only the 's' in 'B' is visible. Here is the relevant part of the C++ standard that describe the behavior: 14.6.2 Dependent names, para 3: In the definition of a class template or in the definition of a member of such a template that appears outside of the template definition, if a base class of this template depends on a template-parameter, the base class scope is not examined during name lookup until the class template is instantiated. [Example: typedef double A; template B { typedef int A; }; template struct X : B { A a; // a has type double }; The type name A in the definition of X binds to the typedef name defined in the global namespace scope, not to the typedef name defined in the base class B. ] http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2469&database=gcc