Support boost 1.68

This commit is contained in:
seelabs
2018-08-09 09:16:02 -04:00
committed by Nik Bougalis
parent c946043280
commit b2f2d89a08
12 changed files with 60 additions and 42 deletions

View File

@@ -48,21 +48,12 @@ struct is_boost_reverse_iterator
explicit is_boost_reverse_iterator() = default;
};
#if BOOST_VERSION >= 105800
template <class It>
struct is_boost_reverse_iterator<boost::intrusive::reverse_iterator<It>>
: std::true_type
{
explicit is_boost_reverse_iterator() = default;
};
#else
template <class It>
struct is_boost_reverse_iterator<boost::intrusive::detail::reverse_iterator<It>>
: std::true_type
{
explicit is_boost_reverse_iterator() = default;
};
#endif
/** Associative container where each element is also indexed by time.

View File

@@ -354,7 +354,6 @@ public:
// Break up the array of strings into blocks
// that each fit into one UDP packet.
//
boost::system::error_code ec;
std::vector <boost::asio::const_buffer> buffers;
buffers.reserve (m_data.size ());
std::size_t size (0);

View File

@@ -73,7 +73,6 @@ ConnectAttempt::stop()
void
ConnectAttempt::run()
{
error_code ec;
stream_.next_layer().async_connect (remote_endpoint_,
strand_.wrap (std::bind (&ConnectAttempt::onConnect,
shared_from_this(), std::placeholders::_1)));

View File

@@ -88,7 +88,6 @@ OverlayImpl::Timer::stop()
void
OverlayImpl::Timer::run()
{
error_code ec;
timer_.expires_from_now (std::chrono::seconds(1));
timer_.async_wait(overlay_.strand_.wrap(
std::bind(&Timer::on_timer, shared_from_this(),

View File

@@ -1628,7 +1628,6 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMHaveTransactionSet> const& m)
void
PeerImp::onMessage (std::shared_ptr <protocol::TMValidation> const& m)
{
error_code ec;
auto const closeTime = app_.timeKeeper().closeTime();
if (m->has_hops() && ! slot_->cluster())

View File

@@ -38,7 +38,7 @@ struct json_body
class reader
{
using dynamic_buffer_type = boost::beast::multi_buffer;
dynamic_buffer_type buffer_;
public:
@@ -85,11 +85,12 @@ struct json_body
using const_buffers_type =
boost::asio::const_buffer;
template<bool isRequest, class Fields>
template <bool isRequest, class Fields>
explicit
writer(boost::beast::http::message<isRequest,
json_body, Fields> const& msg)
: body_string_(to_string(msg.body()))
writer(
boost::beast::http::header<isRequest, Fields> const& fields,
value_type const& value)
: body_string_(to_string(value))
{
}

View File

@@ -113,7 +113,6 @@ class WSClientImpl : public WSClient
cleanup()
{
ios_.post(strand_.wrap([this] {
error_code ec;
if (!peerClosed_)
{
ws_.async_close({}, strand_.wrap([&](error_code ec) {

View File

@@ -97,9 +97,13 @@ class ServerStatus_test :
req.insert("User-Agent", "test");
req.method(boost::beast::http::verb::get);
req.insert("Upgrade", "websocket");
boost::beast::websocket::detail::maskgen maskgen;
boost::beast::websocket::detail::sec_ws_key_type key;
#if BOOST_VERSION >= 106800
boost::beast::websocket::detail::make_sec_ws_key(key);
#else
boost::beast::websocket::detail::maskgen maskgen;
boost::beast::websocket::detail::make_sec_ws_key(key, maskgen);
#endif
req.insert("Sec-WebSocket-Key", key);
req.insert("Sec-WebSocket-Version", "13");
req.insert(boost::beast::http::field::connection, "upgrade");