[Bug c++/45002] Name of member class of template class cannot be used as argument type.

redi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 21 17:37:00 GMT 2010



------- Comment #9 from redi at gcc dot gnu dot org  2010-07-21 17:37 -------
(In reply to comment #7)
> 
> Replacing '::' with '  ' does not change the error message.  I don't

Did you miss the rest of my reply?  I wasn't suggesting that would fix the
error, I was pointing out you've misunderstood how to use typename.

> think you are right about the compiler mistaking `typename' for a 
> namespace; there is no way to test this as `namespace typename { ... }' is 
> rejected by the compiler.

Obviously, because it's completely bogus.
I never suggested the *compiler* mistakes it for a namespace.   The syntax you
want is "typename T::A" and not "typename::T::A" - just look at the examples in
the standard.

This really isn't the right place for you to learn C++, but my last reply has a
link which might explain the new error you're getting. It's not a GCC bug.


-- 


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



More information about the Gcc-bugs mailing list