re PR c++/64382 (ICE due to use of `this` inside a lambda that captures everything...
authorAdam Butcher <adam@jessamine.co.uk>
Fri, 27 Jan 2017 07:59:06 +0000 (07:59 +0000)
committerAdam Butcher <abutcher@gcc.gnu.org>
Fri, 27 Jan 2017 07:59:06 +0000 (07:59 +0000)
commitbb6a6ee9db925bea82bba47b1b3cdd3555fb539b
tree6d74a0c4c4c060c5f3cb24e32b23ffef3968df5b
parent0fb9ec83c38887a5b1da7376873506ae59b2c60e
re PR c++/64382 (ICE due to use of `this` inside a lambda that captures everything by ref inside a member function of a class template)

Fix PR c++/64382

PR c++/64382
* cp/parser.c (parsing_default_capturing_generic_lambda_in_template):
New function.
* cp/cp-tree.h: Declare it.
* cp/semantics.c (finish_id_expression): Resolve names within a default
capturing generic lambda defined within a template prior to
instantiation to allow for captures to be added to the closure type.

PR c++/64382
* g++.dg/cpp1y/pr64382.C: New test.

From-SVN: r244962
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr64382.C [new file with mode: 0644]