[Bug c++/48920] typename specifier should not ignore non-type names
schaub.johannes at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Fri May 6 23:56:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920
--- Comment #1 from Johannes Schaub <schaub.johannes at googlemail dot com> 2011-05-06 23:47:33 UTC ---
(In reply to comment #0)
> […] As a perhaps related issue, the following looks well-formed:
>
> template<typename T>
> void f(typename T::B) { }
>
> template<typename T>
> void f(struct T::B) { }
>
> GCC rejects it as a redefinition. The dependent parameter types of both look
> different.
The Itanium ABI does not include any way to distinguish these two cases, so I
suspect GCC can do nothing about this. And if one were to include "typename" as
a hint into the mangling, I can see how this quickly can get out of hand.
More information about the Gcc-bugs
mailing list