This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52725] error: capture of non-variable (in regards to a variable)
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Mar 2012 15:43:59 +0000
- Subject: [Bug c++/52725] error: capture of non-variable (in regards to a variable)
- Auto-submitted: auto-generated
- References: <bug-52725-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52725
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-26 15:43:59 UTC ---
It works if you remove the parentheses, which also makes the code valid C++
(currently it relies on a GNU extension that allows a variable array size for a
parenthesised new expression, you get a warning with -pedantic or -Wvla)
It seems that there's some interaction between the C++11 lambda parsing and the
GNU extension