This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63268] Ambiguous non-specialized static template scope is accepted
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Sep 2014 12:28:19 +0000
- Subject: [Bug c++/63268] Ambiguous non-specialized static template scope is accepted
- Auto-submitted: auto-generated
- References: <bug-63268-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63268
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to David Kastrup from comment #2)
> class Deriv is not a class template.
I didn't say it is.
> Deriv is an ordinary class with one
> base class being the specialized Bass<int>.
And Bass is a class template. In the scope of Bass the name "Bass" refers to
the current specialization. See 14.6.1 [temp.local].
> I see no reason why in a non-template class definition the unspecialized
> template name of a specialized base class should have any special state.
Because names from base classes are visible in derived classes.
The injected-class-name (see 9 [class] p2) in Bass is visible in derived
classes, like any other name declared in Bass.
> Assuming that you get further in the standard before headaches set in than I
> do, could you cite the section that you derive your opinion from?
I already did, via the linked DRs in the stackoverflow answer, but have
repeated them again above.
I also double-checked with Clang and EDG, which agree with GCC.