From 550f26c7d0573ef6f1bcaadc0bb59cd8d6598776 Mon Sep 17 00:00:00 2001 From: Neel Basu <20411+neel@users.noreply.github.com> Date: Sun, 13 Oct 2024 02:48:22 +0530 Subject: [PATCH 1/2] boost > 1.83 compilation fixed The header file boost/asio/handler_invoke_hook.hpp no longer exists. --- include/ozo/detail/bind.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ozo/detail/bind.h b/include/ozo/detail/bind.h index 2b4b47ae8..95eb05104 100644 --- a/include/ozo/detail/bind.h +++ b/include/ozo/detail/bind.h @@ -5,7 +5,9 @@ #include +#if BOOST_VERSION <= 108300 #include +#endif namespace ozo { namespace detail { From 169f19ab23de86b5038ae24c7134a0f2abdba295 Mon Sep 17 00:00:00 2001 From: neel <20411+neel@users.noreply.github.com> Date: Mon, 17 Feb 2025 23:31:55 +0100 Subject: [PATCH 2/2] - compilation fixes for boost 1.87 --- include/ozo/asio.h | 2 +- include/ozo/detail/bind.h | 2 ++ tests/failover/role_based.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/ozo/asio.h b/include/ozo/asio.h index fd08fca19..9122c1fd0 100644 --- a/include/ozo/asio.h +++ b/include/ozo/asio.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/include/ozo/detail/bind.h b/include/ozo/detail/bind.h index 2b4b47ae8..95eb05104 100644 --- a/include/ozo/detail/bind.h +++ b/include/ozo/detail/bind.h @@ -5,7 +5,9 @@ #include +#if BOOST_VERSION <= 108300 #include +#endif namespace ozo { namespace detail { diff --git a/tests/failover/role_based.cpp b/tests/failover/role_based.cpp index a83138da5..7e5a80821 100644 --- a/tests/failover/role_based.cpp +++ b/tests/failover/role_based.cpp @@ -108,7 +108,7 @@ TEST(role_based_connection_provider__is_supported, should_return_false_for_conne TEST(role_based_connection_provider__rebind, should_call_source_rebind_and_return_new_provider_for_role) { role_based_connection_source_mock source; - boost::asio::io_service io; + boost::asio::io_context io; auto provider = ozo::failover::role_based_connection_provider{ role_based_connection_source {std::addressof(source)}, io @@ -125,7 +125,7 @@ TEST(role_based_connection_provider__rebind, should_call_source_rebind_and_retur TEST(role_based_connection_provider__rebind, should_move_source_call_source_rebind_and_return_new_provider_for_role) { role_based_connection_source_mock source; - boost::asio::io_service io; + boost::asio::io_context io; auto provider = ozo::failover::role_based_connection_provider{ role_based_connection_source {std::addressof(source)}, io @@ -146,7 +146,7 @@ using namespace std::literals; struct role_based_try__initiate_next_try : Test { StrictMock conn; role_based_connection_source_mock source; - boost::asio::io_service io; + boost::asio::io_context io; auto provider() { return ozo::failover::role_based_connection_provider{ @@ -328,7 +328,7 @@ TEST_F(role_based_try__initiate_next_try, should_not_close_connection_on_no_retr struct role_based_try__get_context : Test { role_based_connection_source_mock source; - boost::asio::io_service io; + boost::asio::io_context io; auto provider() { return ozo::failover::role_based_connection_provider{