This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66735] [C++14] lambda init-capture fails for const references
- From: "nathan at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jan 2017 15:24:21 +0000
- Subject: [Bug c++/66735] [C++14] lambda init-capture fails for const references
- Auto-submitted: auto-generated
- References: <bug-66735-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66735
--- Comment #6 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Author: nathan
Date: Wed Jan 4 15:23:40 2017
New Revision: 244056
URL: https://gcc.gnu.org/viewcvs?rev=244056&root=gcc&view=rev
Log:
cp/
PR c++/66735
* cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New.
(lambda_capture_field_type): Update prototype.
* lambda.c (lambda_capture_field_type): Add is_reference parm.
Add referenceness here.
(add_capture): Adjust lambda_capture_field_type call, refactor
error checking.
* pt.c (tsubst): Adjust lambda_capture_field_type call.
testsuite/
PR c++/66735
* g++.dg/cpp1y/pr66735.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr66735.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/lambda.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog