public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7724: template descendant does not see typedefs of tmpl. ancestor
@ 2002-08-26  6:56 zyzstar
  0 siblings, 0 replies; 2+ messages in thread
From: zyzstar @ 2002-08-26  6:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7724
>Category:       c++
>Synopsis:       template descendant does not see typedefs of tmpl. ancestor
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 26 06:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     zyzstar@uid0.sk
>Release:        g++-3.1.1
>Organization:
>Environment:

>Description:
template <typename T_> 
class A 
{ 
public: 
    typedef T_ arg_type; 

   A(arg_type i) : mi(i) {} 
   ~A() {} 

private: 
   arg_type mi; 
}; 


template <typename T_> 
class B : public A<T_> 
{ 
public: 
//   typedef typename A<T_>::arg_type arg_type; 

   B(arg_type i) : A<T_>(i) {} 
   ~B() {} 

}; 

int main() 
{ 
   B<double> b(1); 
   return 0; 
} 

In g++-3.1.1 I have to uncomment the typedef in 
the B class.
This is a problem only if B is a template class. 
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/7724: template descendant does not see typedefs of tmpl. ancestor
@ 2002-08-26 12:29 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-08-26 12:29 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, zyzstar

Synopsis: template descendant does not see typedefs of tmpl. ancestor

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Mon Aug 26 12:26:09 2002
State-Changed-Why:
    not a bug. this is the correct behaviour.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7724


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-26 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-26  6:56 c++/7724: template descendant does not see typedefs of tmpl. ancestor zyzstar
2002-08-26 12:29 nathan

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