update boost on linux
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// ip/impl/address_v6.hpp
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// 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)
|
||||
@@ -25,23 +25,37 @@ namespace boost {
|
||||
namespace asio {
|
||||
namespace ip {
|
||||
|
||||
#if !defined(BOOST_ASIO_NO_DEPRECATED)
|
||||
|
||||
inline address_v6 address_v6::from_string(const char* str)
|
||||
{
|
||||
return boost::asio::ip::make_address_v6(str);
|
||||
}
|
||||
|
||||
inline address_v6 address_v6::from_string(
|
||||
const char* str, boost::system::error_code& ec)
|
||||
{
|
||||
return boost::asio::ip::make_address_v6(str, ec);
|
||||
}
|
||||
|
||||
inline address_v6 address_v6::from_string(const std::string& str)
|
||||
{
|
||||
return boost::asio::ip::make_address_v6(str);
|
||||
}
|
||||
|
||||
inline address_v6 address_v6::from_string(
|
||||
const std::string& str, boost::system::error_code& ec)
|
||||
{
|
||||
return boost::asio::ip::make_address_v6(str, ec);
|
||||
}
|
||||
|
||||
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
|
||||
|
||||
template <typename Elem, typename Traits>
|
||||
std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& os, const address_v6& addr)
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
std::string s = addr.to_string(ec);
|
||||
if (ec)
|
||||
{
|
||||
if (os.exceptions() & std::basic_ostream<Elem, Traits>::failbit)
|
||||
boost::asio::detail::throw_error(ec);
|
||||
else
|
||||
os.setstate(std::basic_ostream<Elem, Traits>::failbit);
|
||||
}
|
||||
else
|
||||
for (std::string::iterator i = s.begin(); i != s.end(); ++i)
|
||||
os << os.widen(*i);
|
||||
return os;
|
||||
return os << addr.to_string().c_str();
|
||||
}
|
||||
|
||||
} // namespace ip
|
||||
|
||||
Reference in New Issue
Block a user