diff --git a/include/simulator/config.hpp b/include/simulator/config.hpp index 325af33..5f25a31 100644 --- a/include/simulator/config.hpp +++ b/include/simulator/config.hpp @@ -31,7 +31,7 @@ All rights reserved. #define SIMULATOR_DECL #endif -#if !defined _MSC_VER || _MSC_VER > 1900 +#if !defined _MSC_VER || _MSC_VER > 1912 #define LIBSIMULATOR_USE_MOVE 1 #else #define LIBSIMULATOR_USE_MOVE 0 diff --git a/include/simulator/simulator.hpp b/include/simulator/simulator.hpp index 6e44b39..dcc9cdd 100644 --- a/include/simulator/simulator.hpp +++ b/include/simulator/simulator.hpp @@ -162,6 +162,11 @@ namespace sim using reuse_address = boost::asio::socket_base::reuse_address; #if BOOST_VERSION >= 106600 using executor_type = boost::asio::ip::tcp::socket::executor_type; + + executor_type get_executor() + { + return m_io_service.get_executor(); + } #endif // socket options @@ -992,6 +997,15 @@ namespace sim io_service(); ~io_service(); +#if BOOST_VERSION >= 106600 + using executor_type = boost::asio::io_service::executor_type; + + executor_type get_executor() + { + return get_internal_service().get_executor(); + } +#endif + #if LIBSIMULATOR_USE_MOVE // not copyable and non movable (it's not movable because we currently // keep pointers to the io_service instances in the simulator object)