[Bug c++/55664] Missing diagnostic "dependent using declaration resolved to type without 'typename'"

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 12 15:41:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55664

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-12 15:41:21 UTC ---
The template is never instantiated so no diagnostic is required.

Even if you instantiate it I'm not sure the code is necessarily ill-formed,
unles you use the name in a way that requires it to be known to be a type.

7.3.3p19 says:

   If a using-declaration uses the keyword typename and specifies a dependent
   name (14.6.2), the name introduced by the using-declaration is treated as
   a typedef-name (7.1.3).

But it doesn't say the keyword typename *must* be used is the using-declaration
specifies a dependent name.



More information about the Gcc-bugs mailing list