https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110686

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to actri_lxlong3 from comment #0)
> Test template name resolution, such as:
> 
> template <char k> struct N {
>     template <char p> struct S23{
> typedef long X;
> void g(void) { try {} catch (typename ::N<k>::S<P>::S23<p>::X) {} }

This code is nonsense, why are you reporting this?

> Error occurs when using typename and nested namespace templates.
> The C++ standard describes that the typename prefix should be used when a
> nested form such as ::N<k>::S<P>::S23<p>::X represents a type rather than a
> member of the currently instantiated template.

Yes, but it also says that you need to say ::template S<P> and ::template
S23<p> but that still won't help because P and S are not declared anywhere.

Reply via email to