[Bug c++/60420] [C++11] Bogus "error:=?UTF-8?Q?=20=E2=80=98const=E2=80=99=20qualifiers=20cannot=20be=20applied=20to=20=E2=80=98int=26=E2=80=99?=" with lambda

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Fri Sep 19 09:15:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-09-19
     Ever confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
In mainline we don't ICE anymore. This is enough to reproduce the issue:

struct Iterator
{
  int& operator*();
};

void foo(Iterator begin)
{
  auto x = [](const decltype(*begin)) { };
}

Note, anyway, that the EDG front-end warns.



More information about the Gcc-bugs mailing list