------- Comment #11 from redi at gcc dot gnu dot org  2010-03-08 14:46 -------
(In reply to comment #4)
> Just noticed this bug myself.  You can work around it by creating
> a temporary typedef.  E.g.,
> 
>   typedef typeof(obj) T;
>   T::size_type s;
> 
> Still annoying though.

This workaround is required for decltype, I don't see why typeof should be any
different.

The reason is that decltype(obj) doesn't declare a new type-name, it is only a
simple-type-specifier, which cannot appear in a nested-name-specifier.

The typedef workaround introduces a new type-name, which is allowed in a
nested-name-specifier.


-- 


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

Reply via email to