[Bug c++/54328] capture pointer by value is not correct
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54328 --- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2012-08-20 07:24:38 UTC --- 'a' isn't a pointer, it's an array, so the closure has a copy of the array and a[0] = 2 doesn't alter the closure's copy.
[Bug c++/54328] capture pointer by value is not correct
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54328 --- Comment #2 from yaoyuan1216 at gmail dot com 2012-08-20 07:38:18 UTC --- (In reply to comment #1) 'a' isn't a pointer, it's an array, so the closure has a copy of the array and a[0] = 2 doesn't alter the closure's copy. Thanks for your reply. You are absolutely right and I'm glad that it is my mistake instead of gcc.
[Bug c++/54328] capture pointer by value is not correct
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54328 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||jakub at gcc dot gnu.org Resolution||INVALID --- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org 2012-08-20 07:45:21 UTC --- Invalid then.