N3648: Allow braced and parenthesized initializers.
authorJason Merrill <jason@redhat.com>
Wed, 24 Apr 2013 15:03:51 +0000 (11:03 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 24 Apr 2013 15:03:51 +0000 (11:03 -0400)
commit399bb2da17cbe7474cd38556d051e921fc74c113
tree4a74df96c106fa41190e45e0d69fd4efc617e763
parent98bdfa5050997aaa055a899f80ff6c14734edd7d
N3648: Allow braced and parenthesized initializers.

* parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
* pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
* semantics.c (lambda_capture_field_type): Use do_auto_deduction.
(add_capture): Collapse a parenthesized initializer into a single
expression.
* cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.

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