Skip to content

Commit

Permalink
fix: follow-up to 717e6cb: add support for compilation with Boost < 1…
Browse files Browse the repository at this point in the history
….87.0
  • Loading branch information
deniskovalchuk committed Dec 19, 2024
1 parent 7e01612 commit 49e620c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions include/ftp/detail/socket_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,17 @@ class socket_base
}

private:
static std::pair<boost::asio::buffers_iterator<boost::asio::const_buffer>, bool>
match_eol(boost::asio::buffers_iterator<boost::asio::const_buffer> begin,
boost::asio::buffers_iterator<boost::asio::const_buffer> end)
/* Boost >= 1.87.0 */
#if BOOST_VERSION >= 108700
using buffers_iterator = boost::asio::buffers_iterator<boost::asio::const_buffer>;
#else
using buffers_iterator = boost::asio::buffers_iterator<boost::asio::const_buffers_1>;
#endif

static std::pair<buffers_iterator, bool>
match_eol(buffers_iterator begin, buffers_iterator end)
{
boost::asio::buffers_iterator<boost::asio::const_buffer> it = begin;
buffers_iterator it = begin;

while (it != end)
{
Expand Down

0 comments on commit 49e620c

Please sign in to comment.