You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bin/clang-repl
clang-repl> int state = 0;
clang-repl> auto toggle = [&]() { return state; };
In file included from <<< inputs >>>:1:
input_line_2:1:16: error: non-local lambda expression cannot have a capture-default
1 | auto toggle = [&]() { return state; };
| ^
error: Parsing failed.
clang-repl> auto toggle = [&state]() { return state; };
input_line_3:1:17: error: 'state' cannot be captured because it does not have automatic storage duration
1 | auto toggle = [&state]() { return state; };
| ^
input_line_1:1:5: note: 'state' declared here
1 | int state = 0;
| ^
error: Parsing failed.
Is this expected behavior on current mainline?
The text was updated successfully, but these errors were encountered:
Is this expected behavior on current mainline?
The text was updated successfully, but these errors were encountered: