Support lambda templates.
authorAdam Butcher <abutcher@gcc.gnu.org>
Mon, 16 Sep 2013 07:14:21 +0000 (08:14 +0100)
committerAdam Butcher <abutcher@gcc.gnu.org>
Mon, 16 Sep 2013 07:14:21 +0000 (08:14 +0100)
commit6a8b219b44bba840fed7e0994a70a60322a29e59
tree5cae05f391ae11f9176555d4c512a76384bc6e3a
parentff63a2f45cf4cead28be7711c83aa7d96b195031
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.

From-SVN: r202611
gcc/cp/decl2.c
gcc/cp/lambda.c
gcc/cp/parser.c
gcc/cp/pt.c