lambda-direct-init.C
166 Bytes
-
Fix lookup of initialized captures in unevaluated context. · 37a7519a
* cp-tree.h (DECL_NORMAL_CAPTURE_P): New. * name-lookup.c (qualify_lookup): Check it. * parser.c (cp_parser_lambda_introducer): Pass explicit_init_p to add_capture. * semantics.c (add_capture): Set DECL_NORMAL_CAPTURE_P on captures without explicit init. (add_default_capture): Pass explicit_init_p. Fix capture by copy of types with explicit copy constructor. * cp-tree.h (TARGET_EXPR_DIRECT_INIT_P): New. (DIRECT_INIT_EXPR_P): New. * typeck.c (convert_for_initialization): Just return if DIRECT_INIT_EXPR_P. * parser.c (cp_parser_lambda_introducer): Use TARGET_EXPR_DIRECT_INIT_P for normal captures. From-SVN: r152500
Jason Merrill committed