This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/6709] [DR743] decltype cannot be used with the :: operator
- From: "dev.lists at jessamine dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 20 Jan 2011 22:03:44 +0000
- Subject: [Bug c++/6709] [DR743] decltype cannot be used with the :: operator
- Auto-submitted: auto-generated
- References: <bug-6709-4@http.gcc.gnu.org/bugzilla/>
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.