From 49e620c3c5456aa80a9c5fc42208952ba1220872 Mon Sep 17 00:00:00 2001 From: Denis Kovalchuk Date: Thu, 19 Dec 2024 13:13:08 +0300 Subject: [PATCH] fix: follow-up to 717e6cb: add support for compilation with Boost < 1.87.0 --- include/ftp/detail/socket_base.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/ftp/detail/socket_base.hpp b/include/ftp/detail/socket_base.hpp index 04f7a94..875630d 100644 --- a/include/ftp/detail/socket_base.hpp +++ b/include/ftp/detail/socket_base.hpp @@ -104,11 +104,17 @@ class socket_base } private: - static std::pair, bool> - match_eol(boost::asio::buffers_iterator begin, - boost::asio::buffers_iterator end) +/* Boost >= 1.87.0 */ +#if BOOST_VERSION >= 108700 + using buffers_iterator = boost::asio::buffers_iterator; +#else + using buffers_iterator = boost::asio::buffers_iterator; +#endif + + static std::pair + match_eol(buffers_iterator begin, buffers_iterator end) { - boost::asio::buffers_iterator it = begin; + buffers_iterator it = begin; while (it != end) {