Skip to content

Commit c0d1cfc

Browse files
committed
Remove deprecated ip::address member functions.
1 parent 7d86e12 commit c0d1cfc

File tree

4 files changed

+0
-75
lines changed

4 files changed

+0
-75
lines changed

include/boost/asio/ip/address.hpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -100,32 +100,6 @@ class address
100100
/// Get the address as a string.
101101
BOOST_ASIO_DECL std::string to_string() const;
102102

103-
#if !defined(BOOST_ASIO_NO_DEPRECATED)
104-
/// (Deprecated: Use other overload.) Get the address as a string.
105-
BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
106-
107-
/// (Deprecated: Use make_address().) Create an address from an IPv4 address
108-
/// string in dotted decimal form, or from an IPv6 address in hexadecimal
109-
/// notation.
110-
static address from_string(const char* str);
111-
112-
/// (Deprecated: Use make_address().) Create an address from an IPv4 address
113-
/// string in dotted decimal form, or from an IPv6 address in hexadecimal
114-
/// notation.
115-
static address from_string(const char* str, boost::system::error_code& ec);
116-
117-
/// (Deprecated: Use make_address().) Create an address from an IPv4 address
118-
/// string in dotted decimal form, or from an IPv6 address in hexadecimal
119-
/// notation.
120-
static address from_string(const std::string& str);
121-
122-
/// (Deprecated: Use make_address().) Create an address from an IPv4 address
123-
/// string in dotted decimal form, or from an IPv6 address in hexadecimal
124-
/// notation.
125-
static address from_string(
126-
const std::string& str, boost::system::error_code& ec);
127-
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
128-
129103
/// Determine whether the address is a loopback address.
130104
BOOST_ASIO_DECL bool is_loopback() const noexcept;
131105

include/boost/asio/ip/impl/address.hpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,12 @@
1717

1818
#if !defined(BOOST_ASIO_NO_IOSTREAM)
1919

20-
#include <boost/asio/detail/throw_error.hpp>
21-
2220
#include <boost/asio/detail/push_options.hpp>
2321

2422
namespace boost {
2523
namespace asio {
2624
namespace ip {
2725

28-
#if !defined(BOOST_ASIO_NO_DEPRECATED)
29-
30-
inline address address::from_string(const char* str)
31-
{
32-
return boost::asio::ip::make_address(str);
33-
}
34-
35-
inline address address::from_string(
36-
const char* str, boost::system::error_code& ec)
37-
{
38-
return boost::asio::ip::make_address(str, ec);
39-
}
40-
41-
inline address address::from_string(const std::string& str)
42-
{
43-
return boost::asio::ip::make_address(str);
44-
}
45-
46-
inline address address::from_string(
47-
const std::string& str, boost::system::error_code& ec)
48-
{
49-
return boost::asio::ip::make_address(str, ec);
50-
}
51-
52-
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
53-
5426
template <typename Elem, typename Traits>
5527
std::basic_ostream<Elem, Traits>& operator<<(
5628
std::basic_ostream<Elem, Traits>& os, const address& addr)

include/boost/asio/ip/impl/address.ipp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,6 @@ std::string address::to_string() const
178178
return ipv4_address_.to_string();
179179
}
180180

181-
#if !defined(BOOST_ASIO_NO_DEPRECATED)
182-
std::string address::to_string(boost::system::error_code& ec) const
183-
{
184-
if (type_ == ipv6)
185-
return ipv6_address_.to_string(ec);
186-
return ipv4_address_.to_string(ec);
187-
}
188-
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
189-
190181
bool address::is_loopback() const noexcept
191182
{
192183
return (type_ == ipv4)

test/ip/address.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,6 @@ void test()
6969
(void)addr_v6_value;
7070

7171
std::string string_value = addr1.to_string();
72-
#if !defined(BOOST_ASIO_NO_DEPRECATED)
73-
string_value = addr1.to_string(ec);
74-
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
75-
76-
// address static functions.
77-
78-
#if !defined(BOOST_ASIO_NO_DEPRECATED)
79-
addr1 = ip::address::from_string("127.0.0.1");
80-
addr1 = ip::address::from_string("127.0.0.1", ec);
81-
addr1 = ip::address::from_string(string_value);
82-
addr1 = ip::address::from_string(string_value, ec);
83-
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
8472

8573
// address comparisons.
8674

0 commit comments

Comments
 (0)