This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/63268] Ambiguous non-specialized static template scope is accepted


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]