This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
The idea of the fix is to postpone the decision whether or not to capture later to the template instantiation.
+ /* This is a hack: + + We absolutely need the capture list to be nonempty if the + template had it nonempty, otherwise, we will have the + conversion-to-function-pointer operator erroneously + added. We use a dummy list with a single element that we + can get rid of easily later + */ + LAMBDA_EXPR_CAPTURE_LIST (r) + = LAMBDA_EXPR_CAPTURE_LIST (t) != NULL_TREE ? tree_cons(NULL_TREE, NULL_TREE, NULL_TREE) : NULL_TREE;
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |