re PR c++/66735 ([C++14] lambda init-capture fails for const references)
authorNathan Sidwell <nathan@acm.org>
Wed, 4 Jan 2017 15:23:40 +0000 (15:23 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 4 Jan 2017 15:23:40 +0000 (15:23 +0000)
commit4bf07f3f5fb4fefa2702eced2291ee5d9cb5ad48
tree9781542b18502d109be586512755bffbd4ea4100
parent65793e420e34fa140025b1b2d68d84e25f305f63
re PR c++/66735 ([C++14] lambda init-capture fails for const references)

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.

From-SVN: r244056
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/lambda.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr66735.C [new file with mode: 0644]