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++/66350] typename should be forbidden in inhering constructors


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Also, "using typename Base<T>::name;" would usually re-declare a type name in
the derived class' scope, but that's not what's happening here. It's
introducing inheriting constructors, not a type.

7.3.3 [namespace.udecl]/19 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).

and we definitely don't want it to be treated as a typedef-name, so "typename"
must not be used for an inheriting constructor.


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