This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/6709] [DR743] decltype cannot be used with the :: operator


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]