Skip to content

Commit

Permalink
Fix implicit copy error on GCC 9+
Browse files Browse the repository at this point in the history
  • Loading branch information
who-biz committed Feb 20, 2020
1 parent d2e11dd commit fb135d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion contrib/epee/include/net/abstract_tcp_server2.inl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ PRAGMA_WARNING_DISABLE_VS(4355)
auto local_ep = socket_.local_endpoint(ec);
CHECK_AND_NO_ASSERT_MES(!ec, false, "Failed to get local endpoint: " << ec.message() << ':' << ec.value());

context = boost::value_initialized<t_connection_context>();
const unsigned long ip_{boost::asio::detail::socket_ops::host_to_network_long(remote_ep.address().to_v4().to_ulong())};

// create a random uuid
Expand Down
3 changes: 3 additions & 0 deletions contrib/epee/include/net/net_utils_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ namespace net_utils
uint64_t m_send_cnt;
double m_current_speed_down;
double m_current_speed_up;
connection_context_base(const connection_context_base&) = default;

connection_context_base(boost::uuids::uuid connection_id,
const network_address &remote_address, bool is_income,
Expand Down Expand Up @@ -262,10 +263,12 @@ namespace net_utils
set_details(a.m_connection_id, a.m_remote_address, a.m_is_income);
return *this;
}


private:
template<class t_protocol_handler>
friend class connection;

void set_details(boost::uuids::uuid connection_id, const network_address &remote_address, bool is_income)
{
this->~connection_context_base();
Expand Down

0 comments on commit fb135d7

Please sign in to comment.