1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Reflect changes in boost::asio released in Boost 1.66. (#428)

The service template parameters are disabled by default for now.
Use BOOST_ASIO_ENABLE_OLD_SERVICES macro to enable the old interface.
This commit is contained in:
Raphnalor 2018-03-11 16:02:20 +03:00 committed by ArseniyShestakov
parent 9d108d59db
commit 83c6ffbda0
4 changed files with 19 additions and 1 deletions

View File

@ -14,6 +14,9 @@
#include "../mapping/CMap.h" #include "../mapping/CMap.h"
#include "../CGameState.h" #include "../CGameState.h"
#if BOOST_VERSION >= 106600
#define BOOST_ASIO_ENABLE_OLD_SERVICES
#endif
#include <boost/asio.hpp> #include <boost/asio.hpp>
using namespace boost; using namespace boost;

View File

@ -22,7 +22,13 @@ namespace boost
{ {
class tcp; class tcp;
} }
#if BOOST_VERSION >= 106600 // Boost version >= 1.66
class io_context;
typedef io_context io_service;
#else
class io_service; class io_service;
#endif
template <typename Protocol> class stream_socket_service; template <typename Protocol> class stream_socket_service;
template <typename Protocol,typename StreamSocketService> template <typename Protocol,typename StreamSocketService>

View File

@ -9,6 +9,9 @@
*/ */
#include "StdInc.h" #include "StdInc.h"
#if BOOST_VERSION >= 106600
#define BOOST_ASIO_ENABLE_OLD_SERVICES
#endif
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include "../lib/filesystem/Filesystem.h" #include "../lib/filesystem/Filesystem.h"

View File

@ -26,7 +26,13 @@ namespace boost
{ {
class tcp; class tcp;
} }
#if BOOST_VERSION >= 106600 // Boost version >= 1.66
class io_context;
typedef io_context io_service;
#else
class io_service; class io_service;
#endif
template <typename Protocol> class stream_socket_service; template <typename Protocol> class stream_socket_service;
template <typename Protocol,typename StreamSocketService> template <typename Protocol,typename StreamSocketService>