| 89 | //------------------------------------------------------------------------------ |
| 90 | |
| 91 | void test_callback() |
| 92 | { |
| 93 | boost::asio::io_context io_context; |
| 94 | |
| 95 | // Test our asynchronous operation using a lambda as a callback. We will use |
| 96 | // an io_context to specify an associated executor. |
| 97 | async_read_input("Enter your name", |
| 98 | boost::asio::bind_executor(io_context, |
| 99 | [](const std::string& result) |
| 100 | { |
| 101 | std::cout << "Hello " << result << "\n"; |
| 102 | })); |
| 103 | |
| 104 | io_context.run(); |
| 105 | } |
| 106 | |
| 107 | //------------------------------------------------------------------------------ |
| 108 |
no test coverage detected