Support lambda templates.
authorabutcher <abutcher@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 Sep 2013 18:54:52 +0000 (18:54 +0000)
committerabutcher <abutcher@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 Sep 2013 18:54:52 +0000 (18:54 +0000)
commit11996e1f2aaf22004d73ce8c18e2a3292044687b
treec54b6a5dc08f5f58aea1692f3456b11ecaf8d3db
parent4964ecc6b7aa31706db7626f786d34e7ddee14ea
Support lambda templates.

* parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
list with std=c++1y or std=gnu++1y.
(cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
operator template to avoid adding template result to symbol table.
* lambda.c (lambda_function): Return template result if call operator is
a template.
(maybe_add_lambda_conv_op): Move declarations to point of use.  Refactor
operator call building in order to support conversion of a non-capturing
lambda template to a function pointer with help from ...
(prepare_op_call): ... this new function.
* decl2.c (check_member_template): Don't reject lambda call operator
template in local [lambda] class.
* pt.c (instantiate_class_template_1): Don't instantiate lambda call
operator template when instantiating lambda class.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202539 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/cp/lambda.c
gcc/cp/parser.c
gcc/cp/pt.c