From 2f2c886eb2da46b9dc8944c8f79ac31a9f116a81 Mon Sep 17 00:00:00 2001 From: ralf1070 Date: Fri, 25 Jan 2019 12:05:37 +0100 Subject: [PATCH] make it compile with boost >= 1.66.0 (#324) --- include/opc/ua/server/addons/asio_addon.h | 12 +----------- include/opc/ua/server/opc_tcp_async.h | 8 -------- include/opc/ua/server/subscription_service.h | 9 --------- include/opc/ua/services/services.h | 16 ++++++++++++++++ src/server/server_object.h | 8 -------- 5 files changed, 17 insertions(+), 36 deletions(-) diff --git a/include/opc/ua/server/addons/asio_addon.h b/include/opc/ua/server/addons/asio_addon.h index 8fed93e3..912c11d1 100644 --- a/include/opc/ua/server/addons/asio_addon.h +++ b/include/opc/ua/server/addons/asio_addon.h @@ -21,17 +21,7 @@ #include - - -namespace boost -{ -namespace asio -{ - -class io_service; - -} -} +#include namespace OpcUa { diff --git a/include/opc/ua/server/opc_tcp_async.h b/include/opc/ua/server/opc_tcp_async.h index e68f6cc2..533cdc92 100644 --- a/include/opc/ua/server/opc_tcp_async.h +++ b/include/opc/ua/server/opc_tcp_async.h @@ -22,14 +22,6 @@ #include #include -namespace boost -{ -namespace asio -{ -class io_service; -} -} - namespace OpcUa { namespace Server diff --git a/include/opc/ua/server/subscription_service.h b/include/opc/ua/server/subscription_service.h index 5ff0e088..f2095e79 100644 --- a/include/opc/ua/server/subscription_service.h +++ b/include/opc/ua/server/subscription_service.h @@ -14,15 +14,6 @@ #include #include - -namespace boost -{ -namespace asio -{ -class io_service; -} -} - namespace OpcUa { namespace Server diff --git a/include/opc/ua/services/services.h b/include/opc/ua/services/services.h index 8d0437c0..f138831b 100644 --- a/include/opc/ua/services/services.h +++ b/include/opc/ua/services/services.h @@ -25,6 +25,22 @@ #include #include +#include + + +namespace boost +{ +namespace asio +{ +#if BOOST_VERSION < 106600 + class io_service; +#else + class io_context; + typedef io_context io_service; +#endif +} +} + namespace OpcUa { diff --git a/src/server/server_object.h b/src/server/server_object.h index 99519eda..d0bedea5 100644 --- a/src/server/server_object.h +++ b/src/server/server_object.h @@ -24,14 +24,6 @@ #include "timer.h" -namespace boost -{ -namespace asio -{ -class io_service; -} -} - namespace OpcUa { namespace Server