Lambda expressions: parse exception specification in lambda functions. Fix lambda testcase for gcc-4.7.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13854 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-10-01 18:53:12 +00:00
commit e68d8024f5
2 changed files with 32 additions and 2 deletions

View file

@ -3295,8 +3295,9 @@ cpp_alternate_rettype : primitive_type { $$ = $1; }
OR
auto myFunc = [](int x, int y) { return x+y; }
*/
c_lambda_decl : c_lambda_decl_front LPAREN parms RPAREN LBRACE { skip_balanced('{','}'); } SEMI { $$ = 0; }
| c_lambda_decl_front LPAREN parms RPAREN ARROW type LBRACE { skip_balanced('{','}'); } SEMI { $$ = 0; }
c_lambda_decl : c_lambda_decl_front LPAREN parms RPAREN cpp_const LBRACE { skip_balanced('{','}'); } SEMI { $$ = 0; }
| c_lambda_decl_front LPAREN parms RPAREN cpp_const ARROW type LBRACE { skip_balanced('{','}'); } SEMI { $$ = 0; }
;
c_lambda_decl_front : storage_class AUTO idcolon EQUAL LBRACKET { skip_balanced('[',']'); $$ = 0; }