Skip to content

Commit 304ccb6

Browse files
committed
test10.cpp
1 parent aeac28a commit 304ccb6

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

section2/test10.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright (c) 2020 by Chrono
2+
//
3+
// g++ test10.cpp -std=c++14 -o a.out;./a.out
4+
// g++ test10.cpp -std=c++14 -I../common -o a.out;./a.out
5+
6+
#include <iostream>
7+
8+
void case1()
9+
{
10+
using namespace std;
11+
12+
auto f1 = [](){};
13+
14+
auto f2 = []()
15+
{
16+
cout << "lambda f2" << endl;
17+
};
18+
19+
f1();
20+
f2();
21+
22+
//f1 = f2;
23+
}
24+
25+
int main()
26+
{
27+
case1();
28+
29+
using namespace std;
30+
31+
cout << "lambda demo" << endl;
32+
}

0 commit comments

Comments
 (0)