Fix build with Asio 1.13-1.17

This commit is contained in:
Cameron Gutman 2022-11-27 20:22:00 -06:00
commit 2f29926dbb

View file

@ -31,7 +31,12 @@ namespace SimpleWeb {
using io_context = asio::io_context; using io_context = asio::io_context;
using resolver_results = asio::ip::tcp::resolver::results_type; using resolver_results = asio::ip::tcp::resolver::results_type;
using async_connect_endpoint = asio::ip::tcp::endpoint; using async_connect_endpoint = asio::ip::tcp::endpoint;
#if(ASIO_STANDALONE && ASIO_VERSION >= 101800) || BOOST_ASIO_VERSION >= 101800
using strand = asio::strand<asio::any_io_executor>; using strand = asio::strand<asio::any_io_executor>;
#else
using strand = asio::strand<asio::executor>;
#endif
template <typename handler_type> template <typename handler_type>
inline void post(io_context &context, handler_type &&handler) { inline void post(io_context &context, handler_type &&handler) {