This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9937: Failure to lookup base class name when base is templatespecialization
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: Thomas Witt <witt at ive dot uni-hannover dot de>
- Cc: gcc-bugs at gcc dot gnu dot org, <gcc-gnats at gcc dot gnu dot org>
- Date: Tue, 4 Mar 2003 10:22:38 -0600 (CST)
- Subject: Re: c++/9937: Failure to lookup base class name when base is templatespecialization
> | Something seems indeed inconsistent. Your access in struct Z
> | is bogus, but this is an extract:
>
> I don't think so.
>
> ~From ISO/IEC 14882
>
> 14.6/2a [...snip...]
Hmph, that's a section that's not in the draft that I use (I don't have a
copy of the final standard, unfortunately).
Given what you cite, that would be another but in gcc. At least, this
doesn't compile with gcc, but does with icc:
----------------------
template <typename> struct B {};
struct Z : B<int> { Z::B *b; };
----------------------
I must admit that I don't really understand the intention of the standard
authors, why this should find B<int>. I also don't understand why the
above should compile, but this variant of struct Z shouldn't (and doesn't
with either gcc and icc):
----------------------
template <typename> struct B {};
struct Z : B<int> { B *b; }; // use B, not Z::B
----------------------
In any case, all the problems in this report are easily worked around, so
while this seems like a bug I wouldn't want to have it high priority.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at ticam dot utexas dot edu
www: http://www.ticam.utexas.edu/~bangerth/