public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2469
@ 2001-04-03  5:26 lerdsuwa
  0 siblings, 0 replies; only message in thread
From: lerdsuwa @ 2001-04-03  5:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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<T>' is hidden since the base
     class 'C<T>' 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<class T> B {
         typedef int A;
       };
       template<class T> struct X : B<T> {
         A a;  // a has type double
       };
      The type name A in the definition of X<T> binds to the 
      typedef name defined in the global namespace scope, not
      to the typedef name defined in the base class B<T>. ]
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2469&database=gcc


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

only message in thread, other threads:[~2001-04-03  5:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-03  5:26 c++/2469 lerdsuwa

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).