This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7218: incorrect 'implicit typename' warnings
- From: "Ryohei Noda" <ndry at mdcplus dot com>
- To: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, lerdsuwa at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, ndry at mdcplus dot com
- Date: Fri, 12 Jul 2002 11:49:16 -0700
- Subject: Re: c++/7218: incorrect 'implicit typename' warnings
lerdsuwa:
Thank you for your reply.
But I have not convinced.
The C++ ISO Standard(14882:1998) reads:
14.6 8(p259)
> The lookup of names dependent on the template parameter is
> postponed until the actual template argument is known(14.6.2).
Compiler should not complain about failing to look up AA
when parsing the code.
14.6.2 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.
The base class scope is examined,
after the actual template argument is known and the class template
(and implicitly the base class template)are instantiated.
Have I something misineterpreted?
> Date: 11 Jul 2002 14:50:01 -0000
> lerdsuwa@gcc.gnu.org Re: c++/7218: incorrect 'implicit typename' warnings
>Synopsis: incorrect 'implicit typename' warnings
>
>State-Changed-From-To: open->closed
>State-Changed-By: lerdsuwa
>State-Changed-When: Thu Jul 11 07:50:00 2002
>State-Changed-Why:
> Not a bug. AA is inside template-parameter dependent
> base class. When parsing class B, names inside A<T>
> are not looked up. You have to write
> template<class T>
> struct B : A<T> { typename A<T>::AA a;};
>
>http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7218
------------------------------------------------------------
Your Free, Private, Fast, E-mail and WebSite: http://MdCplus.com/email
Join the MdCplus affiliates program and Make MONEY: http://MdCplus.com/$/?bmb
---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------