mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Fix for Boost 1.73
This commit is contained in:
parent
cd2dfe0bc2
commit
d2e9b0aece
@ -746,7 +746,7 @@ if(Boost_VERSION_STRING VERSION_LESS 1.73)
|
||||
endif()
|
||||
|
||||
# Workaround for https://github.com/boostorg/format/issues/67
|
||||
if(Boost_VERSION_STRING VERSION_GREATER 1.71)
|
||||
if((Boost_VERSION_STRING VERSION_GREATER 1.71) AND (Boost_VERSION_STRING VERSION_LESS 1.73))
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "rtl_tcp_signal_source_c.h"
|
||||
#include "rtl_tcp_commands.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <map>
|
||||
@ -135,13 +135,13 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
|
||||
|
||||
// 6. Start reading
|
||||
#if BOOST_173_OR_GREATER
|
||||
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, boost::placeholders::_1, boost::placeholders::_2));
|
||||
boost::asio::async_read(socket_, boost::asio::buffer(data_),
|
||||
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, boost::placeholders::_1, boost::placeholders::_2)); // NOLINT(modernize-avoid-bind)
|
||||
#else
|
||||
boost::asio::async_read(socket_, boost::asio::buffer(data_),
|
||||
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, _1, _2)); // NOLINT(modernize-avoid-bind)
|
||||
#endif
|
||||
|
||||
|
||||
boost::thread(
|
||||
#if HAS_GENERIC_LAMBDA
|
||||
[ObjectPtr = &io_context_] { ObjectPtr->run(); });
|
||||
@ -319,9 +319,15 @@ void rtl_tcp_signal_source_c::handle_read(const boost::system::error_code &ec,
|
||||
// let woker know that more data is available
|
||||
not_empty_.notify_one();
|
||||
// Read some more
|
||||
#if BOOST_173_OR_GREATER
|
||||
boost::asio::async_read(socket_,
|
||||
boost::asio::buffer(data_),
|
||||
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, boost::placeholders::_1, boost::placeholders::_2)); // NOLINT(modernize-avoid-bind)
|
||||
#else
|
||||
boost::asio::async_read(socket_,
|
||||
boost::asio::buffer(data_),
|
||||
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, _1, _2)); // NOLINT(modernize-avoid-bind)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user