[Bug c++/66350] typename should be forbidden in inhering constructors
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 5 13:18:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list