| 367 | } |
| 368 | |
| 369 | void any_completion_executor_swap_test() |
| 370 | { |
| 371 | thread_pool pool1(1); |
| 372 | thread_pool pool2(1); |
| 373 | |
| 374 | boost::asio::any_completion_executor ex1(pool1.executor()); |
| 375 | boost::asio::any_completion_executor ex2(pool2.executor()); |
| 376 | |
| 377 | boost::asio::any_completion_executor ex3(ex1); |
| 378 | boost::asio::any_completion_executor ex4(ex2); |
| 379 | |
| 380 | BOOST_ASIO_CHECK(ex3 == ex1); |
| 381 | BOOST_ASIO_CHECK(ex4 == ex2); |
| 382 | |
| 383 | ex3.swap(ex4); |
| 384 | |
| 385 | BOOST_ASIO_CHECK(ex3 == ex2); |
| 386 | BOOST_ASIO_CHECK(ex4 == ex1); |
| 387 | |
| 388 | execution::swap(ex3, ex4); |
| 389 | |
| 390 | BOOST_ASIO_CHECK(ex3 == ex1); |
| 391 | BOOST_ASIO_CHECK(ex4 == ex2); |
| 392 | } |
| 393 | |
| 394 | void any_completion_executor_query_test() |
| 395 | { |