updated boost on windows

This commit is contained in:
Bassem Girgis
2019-08-13 21:48:48 -05:00
parent 7d77d485fd
commit b40a3bee82
5162 changed files with 473027 additions and 116452 deletions

View File

@@ -2,7 +2,7 @@
// ip/detail/impl/endpoint.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -32,7 +32,7 @@ namespace asio {
namespace ip {
namespace detail {
endpoint::endpoint()
endpoint::endpoint() BOOST_ASIO_NOEXCEPT
: data_()
{
data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
@@ -40,7 +40,7 @@ endpoint::endpoint()
data_.v4.sin_addr.s_addr = BOOST_ASIO_OS_DEF(INADDR_ANY);
}
endpoint::endpoint(int family, unsigned short port_num)
endpoint::endpoint(int family, unsigned short port_num) BOOST_ASIO_NOEXCEPT
: data_()
{
using namespace std; // For memcpy.
@@ -70,7 +70,7 @@ endpoint::endpoint(int family, unsigned short port_num)
}
endpoint::endpoint(const boost::asio::ip::address& addr,
unsigned short port_num)
unsigned short port_num) BOOST_ASIO_NOEXCEPT
: data_()
{
using namespace std; // For memcpy.
@@ -81,8 +81,7 @@ endpoint::endpoint(const boost::asio::ip::address& addr,
boost::asio::detail::socket_ops::host_to_network_short(port_num);
data_.v4.sin_addr.s_addr =
boost::asio::detail::socket_ops::host_to_network_long(
static_cast<boost::asio::detail::u_long_type>(
addr.to_v4().to_ulong()));
addr.to_v4().to_uint());
}
else
{
@@ -108,7 +107,7 @@ void endpoint::resize(std::size_t new_size)
}
}
unsigned short endpoint::port() const
unsigned short endpoint::port() const BOOST_ASIO_NOEXCEPT
{
if (is_v4())
{
@@ -122,7 +121,7 @@ unsigned short endpoint::port() const
}
}
void endpoint::port(unsigned short port_num)
void endpoint::port(unsigned short port_num) BOOST_ASIO_NOEXCEPT
{
if (is_v4())
{
@@ -136,7 +135,7 @@ void endpoint::port(unsigned short port_num)
}
}
boost::asio::ip::address endpoint::address() const
boost::asio::ip::address endpoint::address() const BOOST_ASIO_NOEXCEPT
{
using namespace std; // For memcpy.
if (is_v4())
@@ -157,18 +156,18 @@ boost::asio::ip::address endpoint::address() const
}
}
void endpoint::address(const boost::asio::ip::address& addr)
void endpoint::address(const boost::asio::ip::address& addr) BOOST_ASIO_NOEXCEPT
{
endpoint tmp_endpoint(addr, port());
data_ = tmp_endpoint.data_;
}
bool operator==(const endpoint& e1, const endpoint& e2)
bool operator==(const endpoint& e1, const endpoint& e2) BOOST_ASIO_NOEXCEPT
{
return e1.address() == e2.address() && e1.port() == e2.port();
}
bool operator<(const endpoint& e1, const endpoint& e2)
bool operator<(const endpoint& e1, const endpoint& e2) BOOST_ASIO_NOEXCEPT
{
if (e1.address() < e2.address())
return true;
@@ -178,18 +177,14 @@ bool operator<(const endpoint& e1, const endpoint& e2)
}
#if !defined(BOOST_ASIO_NO_IOSTREAM)
std::string endpoint::to_string(boost::system::error_code& ec) const
std::string endpoint::to_string() const
{
std::string a = address().to_string(ec);
if (ec)
return std::string();
std::ostringstream tmp_os;
tmp_os.imbue(std::locale::classic());
if (is_v4())
tmp_os << a;
tmp_os << address();
else
tmp_os << '[' << a << ']';
tmp_os << '[' << address() << ']';
tmp_os << ':' << port();
return tmp_os.str();