Squashed 'Sources/OpenVPNAdapter/Libraries/Vendors/asio/' changes from 90f32660cd..8d4c8c3ce4

8d4c8c3ce4 asio version 1.14.0 released
30336a0873 Revision history.
2a1f68845a On Windows, ensure global object destructors are run.
6f55aeecd0 Fix move-based async_accept between sockets with different executor types.
c1c068c6ad The executor is copied, not moved, when the I/O object moves.
37c8d91d21 Add runtime detection of native I/O executors when using polymorphic wrapper.

git-subtree-dir: Sources/OpenVPNAdapter/Libraries/Vendors/asio
git-subtree-split: 8d4c8c3ce43c866f609d2eda9a43fe5b334620be
This commit is contained in:
Sergey Abramchuk
2019-10-25 20:20:10 +03:00
parent 9ec9e579e9
commit f44694ce5f
9 changed files with 83 additions and 25 deletions

View File

@@ -729,6 +729,17 @@ struct move_accept_handler
private:
move_accept_handler(const move_accept_handler&) {}
};
struct move_accept_ioc_handler
{
move_accept_ioc_handler() {}
void operator()(const asio::error_code&,
asio::basic_stream_socket<asio::ip::tcp,
asio::io_context::executor_type>) {}
move_accept_ioc_handler(move_accept_handler&&) {}
private:
move_accept_ioc_handler(const move_accept_handler&) {}
};
#endif // defined(ASIO_HAS_MOVE)
void test()
@@ -913,8 +924,12 @@ void test()
#if defined(ASIO_HAS_MOVE)
acceptor1.async_accept(move_accept_handler());
acceptor1.async_accept(ioc, move_accept_handler());
acceptor1.async_accept(ioc_ex, move_accept_handler());
acceptor1.async_accept(ioc_ex, move_accept_ioc_handler());
acceptor1.async_accept(peer_endpoint, move_accept_handler());
acceptor1.async_accept(ioc, peer_endpoint, move_accept_handler());
acceptor1.async_accept(ioc_ex, peer_endpoint, move_accept_handler());
acceptor1.async_accept(ioc_ex, peer_endpoint, move_accept_ioc_handler());
#endif // defined(ASIO_HAS_MOVE)
}
catch (std::exception&)