| 211 | //------------------------------------------------------------------------------ |
| 212 | |
| 213 | void test_future() |
| 214 | { |
| 215 | // Test our asynchronous operation using the use_future completion token. |
| 216 | // This token causes the operation's initiating function to return a future, |
| 217 | // which may be used to synchronously wait for the result of the operation. |
| 218 | std::future<std::string> f = |
| 219 | async_read_input("Enter your name", boost::asio::use_future); |
| 220 | |
| 221 | std::string result = f.get(); |
| 222 | std::cout << "Hello " << result << "\n"; |
| 223 | } |
| 224 | |
| 225 | //------------------------------------------------------------------------------ |
| 226 |
no test coverage detected