[Bug c++/6709] [DR743] decltype cannot be used with the :: operator
dev.lists at jessamine dot co.uk
gcc-bugzilla@gcc.gnu.org
Thu Jan 20 22:53:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709
Adam Butcher <dev.lists at jessamine dot co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dev.lists at jessamine dot
| |co.uk
--- Comment #17 from Adam Butcher <dev.lists at jessamine dot co.uk> 2011-01-20 22:03:31 UTC ---
I have the beginnings of a fix for this (see the patch at
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01392.html); currently there is a
bug with my impl where any name on the right of `decltype(x)::' at the front of
a nested-name-specifier is considered a non-type unless qualified with
typename.
I.e. given:
struct X { typedef int I; }
X x;
instead of:
decltype(x)::I i = 7;
the user must currently write:
typename decltype(x)::I i = 7;
as if decltype(x) was somehow dependent on a template parameter -- which it
obviously isn't as there is no template it sight.
Otherwise the patch seems close.
More information about the Gcc-bugs
mailing list