質問編集履歴
2
変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,11 +24,7 @@
|
|
24
24
|
|
25
25
|
// increment(3)の戻り値を、変数x,yとしてラムダ式内で使用する
|
26
26
|
|
27
|
-
auto f = [a = increment(1), b = increment(2), c = increment(3)](int x, int y) {
|
27
|
+
auto f = [a = increment(1), b = increment(2), c = increment(3)](int x, int y) { return x*a*b + y*c; };
|
28
|
-
|
29
|
-
return x*a*b + y*c;
|
30
|
-
|
31
|
-
};
|
32
28
|
|
33
29
|
|
34
30
|
|
1
形式
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,11 @@
|
|
24
24
|
|
25
25
|
// increment(3)の戻り値を、変数x,yとしてラムダ式内で使用する
|
26
26
|
|
27
|
-
auto f = [a = increment(1), b = increment(2), c = increment(3)](int x, int y) {
|
27
|
+
auto f = [a = increment(1), b = increment(2), c = increment(3)](int x, int y) {
|
28
|
+
|
29
|
+
return x*a*b + y*c;
|
30
|
+
|
31
|
+
};
|
28
32
|
|
29
33
|
|
30
34
|
|