diff --git a/include/libtorrent/io_service_fwd.hpp b/include/libtorrent/io_service_fwd.hpp index 71b845d3f..181313430 100644 --- a/include/libtorrent/io_service_fwd.hpp +++ b/include/libtorrent/io_service_fwd.hpp @@ -60,7 +60,7 @@ namespace libtorrent { using io_service = boost::asio::io_service; #endif -#if BOOST_VERSION >= 107000 +#if BOOST_VERSION >= 107000 && !defined TORRENT_BUILD_SIMULATOR template io_service& get_io_service(T& o) { return static_cast(o.get_executor().context()); } #else