This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77523] rejects valid C++14 code with initialized lambda capture
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 Mar 2017 21:34:06 +0000
- Subject: [Bug c++/77523] rejects valid C++14 code with initialized lambda capture
- Auto-submitted: auto-generated
- References: <bug-77523-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77523
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-03-17
CC| |msebor at gcc dot gnu.org,
| |nathan at acm dot org
Ever confirmed|0 |1
Known to fail| |5.4.1, 6.3.0, 7.0
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed. EDG eccp 4.13 also accepts it.
In addition, with today's top of trunk the instantiation context is missing.
This is all I see on output:
$ gcc -Wall -Wextra -Wpedantic -Wrestrict -std=c++1y t.C
t.C: In function ‘void f(T)’:
t.C:3:18: error: cannot capture ‘f<>’ by reference
auto g = [&a = f <>] () {};
^~~~
$
Bisection points to r244056 as the change that caused the loss of the context.
CC'ing the author.