| 1 | #include <functional> |
|---|---|
| 2 | #include <iostream> |
| 3 | |
| 4 | void greet() { |
| 5 | // BREAK HERE |
| 6 | std::cout << "Hello\n"; |
| 7 | } |
| 8 | |
| 9 | int main() { |
| 10 | std::function<void()> func{greet}; |
| 11 | func(); |
| 12 | return 0; |
| 13 | } |
| 14 |
| 1 | #include <functional> |
|---|---|
| 2 | #include <iostream> |
| 3 | |
| 4 | void greet() { |
| 5 | // BREAK HERE |
| 6 | std::cout << "Hello\n"; |
| 7 | } |
| 8 | |
| 9 | int main() { |
| 10 | std::function<void()> func{greet}; |
| 11 | func(); |
| 12 | return 0; |
| 13 | } |
| 14 |