Skip to content

Commit

Permalink
fix boost-1.66 support
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jan 1, 2018
1 parent de7e1e3 commit 5a5e250
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/simulator/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions include/simulator/simulator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5a5e250

Please sign in to comment.